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);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:
- Auth
Type string The authorization Type including APP and ANONYMOUS. Defaults to null.
- Description string
The description of Constant parameter.
- Group
Id string The api gateway that the api belongs to. Defaults to null.
- Request
Config Pulumi.Ali Cloud. Api Gateway. Inputs. Api Request Config Args Request_config defines how users can send requests to your API.
- Service
Type string The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.
- Constant
Parameters List<Pulumi.Ali Cloud. Api Gateway. Inputs. Api Constant Parameter Args> constant_parameters defines the constant parameters of the api.
- Fc
Service Pulumi.Config Ali Cloud. Api Gateway. Inputs. Api Fc Service Config Args fc_service_config defines the config when service_type selected ‘FunctionCompute’.
- Http
Service Pulumi.Config Ali Cloud. Api Gateway. Inputs. Api Http Service Config Args http_service_config defines the config when service_type selected ‘HTTP’.
- Http
Vpc Pulumi.Service Config Ali Cloud. Api Gateway. Inputs. Api Http Vpc Service Config Args http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- Mock
Service Pulumi.Config Ali Cloud. Api Gateway. Inputs. Api Mock Service Config Args http_service_config defines the config when service_type selected ‘MOCK’.
- Name string
System parameter name which supports values including in system parameter list
- Request
Parameters List<Pulumi.Ali Cloud. Api Gateway. Inputs. Api Request Parameter Args> request_parameters defines the request parameters of the api.
- Stage
Names List<string> Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.
- System
Parameters List<Pulumi.Ali Cloud. Api Gateway. Inputs. Api System Parameter Args> system_parameters defines the system parameters of the api.
- Auth
Type string The authorization Type including APP and ANONYMOUS. Defaults to null.
- Description string
The description of Constant parameter.
- Group
Id string The api gateway that the api belongs to. Defaults to null.
- Request
Config ApiRequest Config Request_config defines how users can send requests to your API.
- Service
Type string The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.
- Constant
Parameters []ApiConstant Parameter constant_parameters defines the constant parameters of the api.
- Fc
Service ApiConfig Fc Service Config fc_service_config defines the config when service_type selected ‘FunctionCompute’.
- Http
Service ApiConfig Http Service Config http_service_config defines the config when service_type selected ‘HTTP’.
- Http
Vpc ApiService Config Http Vpc Service Config http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- Mock
Service ApiConfig Mock Service Config http_service_config defines the config when service_type selected ‘MOCK’.
- Name string
System parameter name which supports values including in system parameter list
- Request
Parameters []ApiRequest Parameter request_parameters defines the request parameters of the api.
- Stage
Names []string Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.
- System
Parameters []ApiSystem Parameter system_parameters defines the system parameters of the api.
- auth
Type string The authorization Type including APP and ANONYMOUS. Defaults to null.
- description string
The description of Constant parameter.
- group
Id string The api gateway that the api belongs to. Defaults to null.
- request
Config ApiRequest Config Request_config defines how users can send requests to your API.
- service
Type string The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.
- constant
Parameters ApiConstant Parameter[] constant_parameters defines the constant parameters of the api.
- fc
Service ApiConfig Fc Service Config fc_service_config defines the config when service_type selected ‘FunctionCompute’.
- http
Service ApiConfig Http Service Config http_service_config defines the config when service_type selected ‘HTTP’.
- http
Vpc ApiService Config Http Vpc Service Config http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- mock
Service ApiConfig Mock Service Config http_service_config defines the config when service_type selected ‘MOCK’.
- name string
System parameter name which supports values including in system parameter list
- request
Parameters ApiRequest Parameter[] request_parameters defines the request parameters of the api.
- stage
Names string[] Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.
- system
Parameters ApiSystem Parameter[] 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[ApiRequest Config] 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[ApiConstant Parameter] constant_parameters defines the constant parameters of the api.
- fc_
service_ Dict[Apiconfig Fc Service Config] fc_service_config defines the config when service_type selected ‘FunctionCompute’.
- http_
service_ Dict[Apiconfig Http Service Config] http_service_config defines the config when service_type selected ‘HTTP’.
- http_
vpc_ Dict[Apiservice_ config Http Vpc Service Config] http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- mock_
service_ Dict[Apiconfig Mock Service Config] 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[ApiRequest Parameter] 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[ApiSystem Parameter] 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:
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): Apistatic 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);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:
- Api
Id string The ID of the api of api gateway.
- Auth
Type string The authorization Type including APP and ANONYMOUS. Defaults to null.
- Constant
Parameters List<Pulumi.Ali Cloud. Api Gateway. Inputs. Api Constant Parameter Args> constant_parameters defines the constant parameters of the api.
- Description string
The description of Constant parameter.
- Fc
Service Pulumi.Config Ali Cloud. Api Gateway. Inputs. Api Fc Service Config Args fc_service_config defines the config when service_type selected ‘FunctionCompute’.
- Group
Id string The api gateway that the api belongs to. Defaults to null.
- Http
Service Pulumi.Config Ali Cloud. Api Gateway. Inputs. Api Http Service Config Args http_service_config defines the config when service_type selected ‘HTTP’.
- Http
Vpc Pulumi.Service Config Ali Cloud. Api Gateway. Inputs. Api Http Vpc Service Config Args http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- Mock
Service Pulumi.Config Ali Cloud. Api Gateway. Inputs. Api Mock Service Config Args http_service_config defines the config when service_type selected ‘MOCK’.
- Name string
System parameter name which supports values including in system parameter list
- Request
Config Pulumi.Ali Cloud. Api Gateway. Inputs. Api Request Config Args Request_config defines how users can send requests to your API.
- Request
Parameters List<Pulumi.Ali Cloud. Api Gateway. Inputs. Api Request Parameter Args> request_parameters defines the request parameters of the api.
- Service
Type string The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.
- Stage
Names List<string> Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.
- System
Parameters List<Pulumi.Ali Cloud. Api Gateway. Inputs. Api System Parameter Args> system_parameters defines the system parameters of the api.
- Api
Id string The ID of the api of api gateway.
- Auth
Type string The authorization Type including APP and ANONYMOUS. Defaults to null.
- Constant
Parameters []ApiConstant Parameter constant_parameters defines the constant parameters of the api.
- Description string
The description of Constant parameter.
- Fc
Service ApiConfig Fc Service Config fc_service_config defines the config when service_type selected ‘FunctionCompute’.
- Group
Id string The api gateway that the api belongs to. Defaults to null.
- Http
Service ApiConfig Http Service Config http_service_config defines the config when service_type selected ‘HTTP’.
- Http
Vpc ApiService Config Http Vpc Service Config http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- Mock
Service ApiConfig Mock Service Config http_service_config defines the config when service_type selected ‘MOCK’.
- Name string
System parameter name which supports values including in system parameter list
- Request
Config ApiRequest Config Request_config defines how users can send requests to your API.
- Request
Parameters []ApiRequest Parameter request_parameters defines the request parameters of the api.
- Service
Type string The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.
- Stage
Names []string Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.
- System
Parameters []ApiSystem Parameter system_parameters defines the system parameters of the api.
- api
Id string The ID of the api of api gateway.
- auth
Type string The authorization Type including APP and ANONYMOUS. Defaults to null.
- constant
Parameters ApiConstant Parameter[] constant_parameters defines the constant parameters of the api.
- description string
The description of Constant parameter.
- fc
Service ApiConfig Fc Service Config fc_service_config defines the config when service_type selected ‘FunctionCompute’.
- group
Id string The api gateway that the api belongs to. Defaults to null.
- http
Service ApiConfig Http Service Config http_service_config defines the config when service_type selected ‘HTTP’.
- http
Vpc ApiService Config Http Vpc Service Config http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- mock
Service ApiConfig Mock Service Config http_service_config defines the config when service_type selected ‘MOCK’.
- name string
System parameter name which supports values including in system parameter list
- request
Config ApiRequest Config Request_config defines how users can send requests to your API.
- request
Parameters ApiRequest Parameter[] request_parameters defines the request parameters of the api.
- service
Type string The type of backend service. Type including HTTP,VPC and MOCK. Defaults to null.
- stage
Names string[] Stages that the api need to be deployed. Valid value: RELEASE | PRE | TEST.
- system
Parameters ApiSystem Parameter[] 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[ApiConstant Parameter] constant_parameters defines the constant parameters of the api.
- description str
The description of Constant parameter.
- fc_
service_ Dict[Apiconfig Fc Service Config] 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_ Dict[Apiconfig Http Service Config] http_service_config defines the config when service_type selected ‘HTTP’.
- http_
vpc_ Dict[Apiservice_ config Http Vpc Service Config] http_vpc_service_config defines the config when service_type selected ‘HTTP-VPC’.
- mock_
service_ Dict[Apiconfig Mock Service Config] 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[ApiRequest Config] Request_config defines how users can send requests to your API.
- request_
parameters List[ApiRequest Parameter] 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[ApiSystem Parameter] system_parameters defines the system parameters of the api.
Supporting Types
ApiConstantParameter
- 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
- Function
Name string The function name of function compute service.
- Region string
The region that the function compute service belongs to.
- Service
Name string The service name of function compute service.
- Timeout int
Backend service time-out time; unit: millisecond.
- Arn
Role 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 string The function name of function compute service.
- Region string
The region that the function compute service belongs to.
- Service
Name string The service name of function compute service.
- Timeout int
Backend service time-out time; unit: millisecond.
- Arn
Role 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 string The function name of function compute service.
- region string
The region that the function compute service belongs to.
- service
Name string The service name of function compute service.
- timeout number
Backend service time-out time; unit: millisecond.
- arn
Role 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.
- service
Name str The service name of function compute service.
- timeout float
Backend service time-out time; unit: millisecond.
- arn
Role 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
ApiHttpVpcServiceConfig
ApiMockServiceConfig
ApiRequestConfig
- 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’
- Body
Format 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’
- Body
Format 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’
- body
Format 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’
- body
Format str The body format of the api, which support the values of ‘STREAM’ and ‘FORM’
ApiRequestParameter
- In string
System parameter location; values: ‘HEAD’ and ‘QUERY’.
- In
Service 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
- Name
Service 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”
- Default
Value string The default value of the parameter.
- Description string
The description of Constant parameter.
- In string
System parameter location; values: ‘HEAD’ and ‘QUERY’.
- In
Service 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
- Name
Service 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”
- Default
Value string The default value of the parameter.
- Description string
The description of Constant parameter.
- in string
System parameter location; values: ‘HEAD’ and ‘QUERY’.
- in
Service 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
- name
Service 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”
- default
Value string The default value of the parameter.
- description string
The description of Constant parameter.
- in str
System parameter location; values: ‘HEAD’ and ‘QUERY’.
- in
Service 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
- name
Service 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”
- default
Value str The default value of the parameter.
- description str
The description of Constant parameter.
ApiSystemParameter
- In string
System parameter location; values: ‘HEAD’ and ‘QUERY’.
- Name string
System parameter name which supports values including in system parameter list
- Name
Service 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
- Name
Service 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
- name
Service 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
- name
Service 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
alicloudTerraform Provider.