Api

Create a Api Resource

new Api(name: string, args: ApiArgs, opts?: CustomResourceOptions);
def Api(resource_name, opts=None, auth_type=None, constant_parameters=None, description=None, fc_service_config=None, group_id=None, http_service_config=None, http_vpc_service_config=None, mock_service_config=None, name=None, request_config=None, request_parameters=None, service_type=None, stage_names=None, system_parameters=None, __props__=None);
func NewApi(ctx *Context, name string, args ApiArgs, opts ...ResourceOption) (*Api, error)
public Api(string name, ApiArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ApiArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ApiArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ApiArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Api Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Api resource accepts the following input properties:

AuthType string

The authorization Type including APP and ANONYMOUS. Defaults to null.

Description string

The description of Constant parameter.

GroupId string

The api gateway that the api belongs to. Defaults to null.

RequestConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiRequestConfigArgs

Request_config defines how users can send requests to your API.

ServiceType string

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

ConstantParameters List<Pulumi.AliCloud.ApiGateway.Inputs.ApiConstantParameterArgs>

constant_parameters defines the constant parameters of the api.

FcServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiFcServiceConfigArgs

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

HttpServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiHttpServiceConfigArgs

http_service_config defines the config when service_type selected ‘HTTP’.

HttpVpcServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiHttpVpcServiceConfigArgs

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

MockServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiMockServiceConfigArgs

http_service_config defines the config when service_type selected ‘MOCK’.

Name string

System parameter name which supports values including in system parameter list

RequestParameters List<Pulumi.AliCloud.ApiGateway.Inputs.ApiRequestParameterArgs>

request_parameters defines the request parameters of the api.

StageNames List<string>

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

SystemParameters List<Pulumi.AliCloud.ApiGateway.Inputs.ApiSystemParameterArgs>

system_parameters defines the system parameters of the api.

AuthType string

The authorization Type including APP and ANONYMOUS. Defaults to null.

Description string

The description of Constant parameter.

GroupId string

The api gateway that the api belongs to. Defaults to null.

RequestConfig ApiRequestConfig

Request_config defines how users can send requests to your API.

ServiceType string

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

ConstantParameters []ApiConstantParameter

constant_parameters defines the constant parameters of the api.

FcServiceConfig ApiFcServiceConfig

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

HttpServiceConfig ApiHttpServiceConfig

http_service_config defines the config when service_type selected ‘HTTP’.

HttpVpcServiceConfig ApiHttpVpcServiceConfig

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

MockServiceConfig ApiMockServiceConfig

http_service_config defines the config when service_type selected ‘MOCK’.

Name string

System parameter name which supports values including in system parameter list

RequestParameters []ApiRequestParameter

request_parameters defines the request parameters of the api.

StageNames []string

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

SystemParameters []ApiSystemParameter

system_parameters defines the system parameters of the api.

authType string

The authorization Type including APP and ANONYMOUS. Defaults to null.

description string

The description of Constant parameter.

groupId string

The api gateway that the api belongs to. Defaults to null.

requestConfig ApiRequestConfig

Request_config defines how users can send requests to your API.

serviceType string

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

constantParameters ApiConstantParameter[]

constant_parameters defines the constant parameters of the api.

fcServiceConfig ApiFcServiceConfig

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

httpServiceConfig ApiHttpServiceConfig

http_service_config defines the config when service_type selected ‘HTTP’.

httpVpcServiceConfig ApiHttpVpcServiceConfig

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

mockServiceConfig ApiMockServiceConfig

http_service_config defines the config when service_type selected ‘MOCK’.

name string

System parameter name which supports values including in system parameter list

requestParameters ApiRequestParameter[]

request_parameters defines the request parameters of the api.

stageNames string[]

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

systemParameters ApiSystemParameter[]

system_parameters defines the system parameters of the api.

auth_type str

The authorization Type including APP and ANONYMOUS. Defaults to null.

description str

The description of Constant parameter.

group_id str

The api gateway that the api belongs to. Defaults to null.

request_config Dict[ApiRequestConfig]

Request_config defines how users can send requests to your API.

service_type str

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

constant_parameters List[ApiConstantParameter]

constant_parameters defines the constant parameters of the api.

fc_service_config Dict[ApiFcServiceConfig]

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

http_service_config Dict[ApiHttpServiceConfig]

http_service_config defines the config when service_type selected ‘HTTP’.

http_vpc_service_config Dict[ApiHttpVpcServiceConfig]

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

mock_service_config Dict[ApiMockServiceConfig]

http_service_config defines the config when service_type selected ‘MOCK’.

name str

System parameter name which supports values including in system parameter list

request_parameters List[ApiRequestParameter]

request_parameters defines the request parameters of the api.

stage_names List[str]

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

system_parameters List[ApiSystemParameter]

system_parameters defines the system parameters of the api.

Outputs

All input properties are implicitly available as output properties. Additionally, the Api resource produces the following output properties:

ApiId string

The ID of the api of api gateway.

Id string
The provider-assigned unique ID for this managed resource.
ApiId string

The ID of the api of api gateway.

Id string
The provider-assigned unique ID for this managed resource.
apiId string

The ID of the api of api gateway.

id string
The provider-assigned unique ID for this managed resource.
api_id str

The ID of the api of api gateway.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Api Resource

Get an existing Api resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ApiState, opts?: CustomResourceOptions): Api
static get(resource_name, id, opts=None, api_id=None, auth_type=None, constant_parameters=None, description=None, fc_service_config=None, group_id=None, http_service_config=None, http_vpc_service_config=None, mock_service_config=None, name=None, request_config=None, request_parameters=None, service_type=None, stage_names=None, system_parameters=None, __props__=None);
func GetApi(ctx *Context, name string, id IDInput, state *ApiState, opts ...ResourceOption) (*Api, error)
public static Api Get(string name, Input<string> id, ApiState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ApiId string

The ID of the api of api gateway.

AuthType string

The authorization Type including APP and ANONYMOUS. Defaults to null.

ConstantParameters List<Pulumi.AliCloud.ApiGateway.Inputs.ApiConstantParameterArgs>

constant_parameters defines the constant parameters of the api.

Description string

The description of Constant parameter.

FcServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiFcServiceConfigArgs

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

GroupId string

The api gateway that the api belongs to. Defaults to null.

HttpServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiHttpServiceConfigArgs

http_service_config defines the config when service_type selected ‘HTTP’.

HttpVpcServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiHttpVpcServiceConfigArgs

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

MockServiceConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiMockServiceConfigArgs

http_service_config defines the config when service_type selected ‘MOCK’.

Name string

System parameter name which supports values including in system parameter list

RequestConfig Pulumi.AliCloud.ApiGateway.Inputs.ApiRequestConfigArgs

Request_config defines how users can send requests to your API.

RequestParameters List<Pulumi.AliCloud.ApiGateway.Inputs.ApiRequestParameterArgs>

request_parameters defines the request parameters of the api.

ServiceType string

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

StageNames List<string>

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

SystemParameters List<Pulumi.AliCloud.ApiGateway.Inputs.ApiSystemParameterArgs>

system_parameters defines the system parameters of the api.

ApiId string

The ID of the api of api gateway.

AuthType string

The authorization Type including APP and ANONYMOUS. Defaults to null.

ConstantParameters []ApiConstantParameter

constant_parameters defines the constant parameters of the api.

Description string

The description of Constant parameter.

FcServiceConfig ApiFcServiceConfig

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

GroupId string

The api gateway that the api belongs to. Defaults to null.

HttpServiceConfig ApiHttpServiceConfig

http_service_config defines the config when service_type selected ‘HTTP’.

HttpVpcServiceConfig ApiHttpVpcServiceConfig

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

MockServiceConfig ApiMockServiceConfig

http_service_config defines the config when service_type selected ‘MOCK’.

Name string

System parameter name which supports values including in system parameter list

RequestConfig ApiRequestConfig

Request_config defines how users can send requests to your API.

RequestParameters []ApiRequestParameter

request_parameters defines the request parameters of the api.

ServiceType string

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

StageNames []string

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

SystemParameters []ApiSystemParameter

system_parameters defines the system parameters of the api.

apiId string

The ID of the api of api gateway.

authType string

The authorization Type including APP and ANONYMOUS. Defaults to null.

constantParameters ApiConstantParameter[]

constant_parameters defines the constant parameters of the api.

description string

The description of Constant parameter.

fcServiceConfig ApiFcServiceConfig

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

groupId string

The api gateway that the api belongs to. Defaults to null.

httpServiceConfig ApiHttpServiceConfig

http_service_config defines the config when service_type selected ‘HTTP’.

httpVpcServiceConfig ApiHttpVpcServiceConfig

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

mockServiceConfig ApiMockServiceConfig

http_service_config defines the config when service_type selected ‘MOCK’.

name string

System parameter name which supports values including in system parameter list

requestConfig ApiRequestConfig

Request_config defines how users can send requests to your API.

requestParameters ApiRequestParameter[]

request_parameters defines the request parameters of the api.

serviceType string

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

stageNames string[]

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

systemParameters ApiSystemParameter[]

system_parameters defines the system parameters of the api.

api_id str

The ID of the api of api gateway.

auth_type str

The authorization Type including APP and ANONYMOUS. Defaults to null.

constant_parameters List[ApiConstantParameter]

constant_parameters defines the constant parameters of the api.

description str

The description of Constant parameter.

fc_service_config Dict[ApiFcServiceConfig]

fc_service_config defines the config when service_type selected ‘FunctionCompute’.

group_id str

The api gateway that the api belongs to. Defaults to null.

http_service_config Dict[ApiHttpServiceConfig]

http_service_config defines the config when service_type selected ‘HTTP’.

http_vpc_service_config Dict[ApiHttpVpcServiceConfig]

http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.

mock_service_config Dict[ApiMockServiceConfig]

http_service_config defines the config when service_type selected ‘MOCK’.

name str

System parameter name which supports values including in system parameter list

request_config Dict[ApiRequestConfig]

Request_config defines how users can send requests to your API.

request_parameters List[ApiRequestParameter]

request_parameters defines the request parameters of the api.

service_type str

The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.

stage_names List[str]

Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.

system_parameters List[ApiSystemParameter]

system_parameters defines the system parameters of the api.

Supporting Types

ApiConstantParameter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

In string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

Name string

System parameter name which supports values including in system parameter list

Value string

Constant parameter value.

Description string

The description of Constant parameter.

In string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

Name string

System parameter name which supports values including in system parameter list

Value string

Constant parameter value.

Description string

The description of Constant parameter.

in string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

name string

System parameter name which supports values including in system parameter list

value string

Constant parameter value.

description string

The description of Constant parameter.

in str

System parameter location; values: ‘HEAD’ and ‘QUERY’.

name str

System parameter name which supports values including in system parameter list

value str

Constant parameter value.

description str

The description of Constant parameter.

ApiFcServiceConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

FunctionName string

The function name of function compute service.

Region string

The region that the function compute service belongs to.

ServiceName string

The service name of function compute service.

Timeout int

Backend service time-out time; unit: millisecond.

ArnRole string

RAM role arn attached to the Function Compute service. This governs both who / what can invoke your Function, as well as what resources our Function has access to. See User Permissions for more details.

FunctionName string

The function name of function compute service.

Region string

The region that the function compute service belongs to.

ServiceName string

The service name of function compute service.

Timeout int

Backend service time-out time; unit: millisecond.

ArnRole string

RAM role arn attached to the Function Compute service. This governs both who / what can invoke your Function, as well as what resources our Function has access to. See User Permissions for more details.

functionName string

The function name of function compute service.

region string

The region that the function compute service belongs to.

serviceName string

The service name of function compute service.

timeout number

Backend service time-out time; unit: millisecond.

arnRole string

RAM role arn attached to the Function Compute service. This governs both who / what can invoke your Function, as well as what resources our Function has access to. See User Permissions for more details.

function_name str

The function name of function compute service.

region str

The region that the function compute service belongs to.

serviceName str

The service name of function compute service.

timeout float

Backend service time-out time; unit: millisecond.

arnRole str

RAM role arn attached to the Function Compute service. This governs both who / what can invoke your Function, as well as what resources our Function has access to. See User Permissions for more details.

ApiHttpServiceConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Address string

The address of backend service.

Method string

The http method of backend service.

Path string

The path of backend service.

Timeout int

Backend service time-out time; unit: millisecond.

AoneName string
Address string

The address of backend service.

Method string

The http method of backend service.

Path string

The path of backend service.

Timeout int

Backend service time-out time; unit: millisecond.

AoneName string
address string

The address of backend service.

method string

The http method of backend service.

path string

The path of backend service.

timeout number

Backend service time-out time; unit: millisecond.

aoneName string
address str

The address of backend service.

method str

The http method of backend service.

path str

The path of backend service.

timeout float

Backend service time-out time; unit: millisecond.

aoneName str

ApiHttpVpcServiceConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Method string

The http method of backend service.

Name string

System parameter name which supports values including in system parameter list

Path string

The path of backend service.

Timeout int

Backend service time-out time; unit: millisecond.

AoneName string
Method string

The http method of backend service.

Name string

System parameter name which supports values including in system parameter list

Path string

The path of backend service.

Timeout int

Backend service time-out time; unit: millisecond.

AoneName string
method string

The http method of backend service.

name string

System parameter name which supports values including in system parameter list

path string

The path of backend service.

timeout number

Backend service time-out time; unit: millisecond.

aoneName string
method str

The http method of backend service.

name str

System parameter name which supports values including in system parameter list

path str

The path of backend service.

timeout float

Backend service time-out time; unit: millisecond.

aoneName str

ApiMockServiceConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Result string

The result of the mock service.

AoneName string
Result string

The result of the mock service.

AoneName string
result string

The result of the mock service.

aoneName string
result str

The result of the mock service.

aoneName str

ApiRequestConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Method string

The http method of backend service.

Mode string

The mode of the parameters between request parameters and service parameters, which support the values of ‘MAPPING’ and ‘PASSTHROUGH’

Path string

The path of backend service.

Protocol string

The protocol of api which supports values of ‘HTTP’,‘HTTPS’ or ‘HTTP,HTTPS’

BodyFormat string

The body format of the api, which support the values of ‘STREAM’ and ‘FORM’

Method string

The http method of backend service.

Mode string

The mode of the parameters between request parameters and service parameters, which support the values of ‘MAPPING’ and ‘PASSTHROUGH’

Path string

The path of backend service.

Protocol string

The protocol of api which supports values of ‘HTTP’,‘HTTPS’ or ‘HTTP,HTTPS’

BodyFormat string

The body format of the api, which support the values of ‘STREAM’ and ‘FORM’

method string

The http method of backend service.

mode string

The mode of the parameters between request parameters and service parameters, which support the values of ‘MAPPING’ and ‘PASSTHROUGH’

path string

The path of backend service.

protocol string

The protocol of api which supports values of ‘HTTP’,‘HTTPS’ or ‘HTTP,HTTPS’

bodyFormat string

The body format of the api, which support the values of ‘STREAM’ and ‘FORM’

method str

The http method of backend service.

mode str

The mode of the parameters between request parameters and service parameters, which support the values of ‘MAPPING’ and ‘PASSTHROUGH’

path str

The path of backend service.

protocol str

The protocol of api which supports values of ‘HTTP’,‘HTTPS’ or ‘HTTP,HTTPS’

bodyFormat str

The body format of the api, which support the values of ‘STREAM’ and ‘FORM’

ApiRequestParameter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

In string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

InService string

Backend service’s parameter location; values: BODY, HEAD, QUERY, and PATH.

Name string

System parameter name which supports values including in system parameter list

NameService string

Backend service’s parameter name.

Required string

Parameter required or not; values: REQUIRED and OPTIONAL.

Type string

Parameter type which supports values of ‘STRING’,‘INT’,‘BOOLEAN’,‘LONG’,“FLOAT” and “DOUBLE”

DefaultValue string

The default value of the parameter.

Description string

The description of Constant parameter.

In string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

InService string

Backend service’s parameter location; values: BODY, HEAD, QUERY, and PATH.

Name string

System parameter name which supports values including in system parameter list

NameService string

Backend service’s parameter name.

Required string

Parameter required or not; values: REQUIRED and OPTIONAL.

Type string

Parameter type which supports values of ‘STRING’,‘INT’,‘BOOLEAN’,‘LONG’,“FLOAT” and “DOUBLE”

DefaultValue string

The default value of the parameter.

Description string

The description of Constant parameter.

in string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

inService string

Backend service’s parameter location; values: BODY, HEAD, QUERY, and PATH.

name string

System parameter name which supports values including in system parameter list

nameService string

Backend service’s parameter name.

required string

Parameter required or not; values: REQUIRED and OPTIONAL.

type string

Parameter type which supports values of ‘STRING’,‘INT’,‘BOOLEAN’,‘LONG’,“FLOAT” and “DOUBLE”

defaultValue string

The default value of the parameter.

description string

The description of Constant parameter.

in str

System parameter location; values: ‘HEAD’ and ‘QUERY’.

inService str

Backend service’s parameter location; values: BODY, HEAD, QUERY, and PATH.

name str

System parameter name which supports values including in system parameter list

nameService str

Backend service’s parameter name.

required str

Parameter required or not; values: REQUIRED and OPTIONAL.

type str

Parameter type which supports values of ‘STRING’,‘INT’,‘BOOLEAN’,‘LONG’,“FLOAT” and “DOUBLE”

defaultValue str

The default value of the parameter.

description str

The description of Constant parameter.

ApiSystemParameter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

In string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

Name string

System parameter name which supports values including in system parameter list

NameService string

Backend service’s parameter name.

In string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

Name string

System parameter name which supports values including in system parameter list

NameService string

Backend service’s parameter name.

in string

System parameter location; values: ‘HEAD’ and ‘QUERY’.

name string

System parameter name which supports values including in system parameter list

nameService string

Backend service’s parameter name.

in str

System parameter location; values: ‘HEAD’ and ‘QUERY’.

name str

System parameter name which supports values including in system parameter list

nameService str

Backend service’s parameter name.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.