Skip to content

ApiProps

Properties for defining a Api.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-apigateway-api

Initializer

import ros_cdk_apigateway
ros_cdk_apigateway.ApiProps(
  api_name: typing.Union[str, IResolvable],
  group_id: typing.Union[str, IResolvable],
  request_config: typing.Union[IResolvable, RequestConfigProperty],
  result_sample: typing.Union[str, IResolvable],
  result_type: typing.Union[str, IResolvable],
  service_config: typing.Union[IResolvable, ServiceConfigProperty],
  visibility: typing.Union[str, IResolvable],
  allow_signature_method: typing.Union[str, IResolvable] = None,
  app_code_auth_type: typing.Union[str, IResolvable] = None,
  auth_type: typing.Union[str, IResolvable] = None,
  const_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ConstParametersProperty]]] = None,
  description: typing.Union[str, IResolvable] = None,
  disable_internet: typing.Union[bool, IResolvable] = None,
  error_code_samples: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ErrorCodeSamplesProperty]]] = None,
  fail_result_sample: typing.Union[str, IResolvable] = None,
  force_nonce_check: typing.Union[bool, IResolvable] = None,
  open_id_connect_config: typing.Union[IResolvable, OpenIdConnectConfigProperty] = None,
  request_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, RequestParametersProperty]]] = None,
  result_body_model: typing.Union[str, IResolvable] = None,
  result_descriptions: typing.Union[str, IResolvable] = None,
  service_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ServiceParametersProperty]]] = None,
  service_parameters_map: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ServiceParametersMapProperty]]] = None,
  system_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, SystemParametersProperty]]] = None,
  tags: typing.List[TagsProperty] = None,
  web_socket_api_type: typing.Union[str, IResolvable] = None
)

Properties

Name Type Description
api_name typing.Union[str, ros_cdk_core.IResolvable] Property apiName: The name of the API.Need [4, 50] Chinese\English\Number characters or "_",and should start with Chinese\/English character.
group_id typing.Union[str, ros_cdk_core.IResolvable] Property groupId: The id of the Group.
request_config typing.Union[ros_cdk_core.IResolvable, RequestConfigProperty] Property requestConfig: The configuration of the request.
result_sample typing.Union[str, ros_cdk_core.IResolvable] Property resultSample: The sample of the result.
result_type typing.Union[str, ros_cdk_core.IResolvable] Property resultType: The format of service's response, "JSON", "TEXT", "BINARY", "XML", "HTML" or "PASSTHROUGH".
service_config typing.Union[ros_cdk_core.IResolvable, ServiceConfigProperty] Property serviceConfig: The configuration of the service.
visibility typing.Union[str, ros_cdk_core.IResolvable] Property visibility: Whether to make the API public.
allow_signature_method typing.Union[str, ros_cdk_core.IResolvable] Property allowSignatureMethod: If the AuthType is APP authentication, you need to pass this value to specify the signature algorithm.
app_code_auth_type typing.Union[str, ros_cdk_core.IResolvable] Property appCodeAuthType: When AuthType is APP authentication, the optional values are as follows: If not passed, the default value is DEFAULT: DEFAULT: Default (set by group).
auth_type typing.Union[str, ros_cdk_core.IResolvable] Property authType: Type of authorization of the API .
const_parameters typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ConstParametersProperty]]] Property constParameters: The const parameters.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: Description of the API, less than 180 characters.
disable_internet typing.Union[bool, ros_cdk_core.IResolvable] Property disableInternet: Set DisableInternet to true, only support intranet to call API.
error_code_samples typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ErrorCodeSamplesProperty]]] Property errorCodeSamples: The Error Code samples.
fail_result_sample typing.Union[str, ros_cdk_core.IResolvable] Property failResultSample: The sample of the fail result.
force_nonce_check typing.Union[bool, ros_cdk_core.IResolvable] Property forceNonceCheck: Set ForceNonceCheck to true, compulsorily check X-Ca-Nonce when requesting, this is the unique identifier of the request, generally using UUID to identify.
open_id_connect_config typing.Union[ros_cdk_core.IResolvable, OpenIdConnectConfigProperty] Property openIdConnectConfig: The configuration of the open id.
request_parameters typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, RequestParametersProperty]]] Property requestParameters: The request parameters.
result_body_model typing.Union[str, ros_cdk_core.IResolvable] Property resultBodyModel: The return result of the API.
result_descriptions typing.Union[str, ros_cdk_core.IResolvable] Property resultDescriptions: The return description of the API.
service_parameters typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ServiceParametersProperty]]] Property serviceParameters: The service parameters.
service_parameters_map typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ServiceParametersMapProperty]]] Property serviceParametersMap: The mapping relation between (request parameters\const parameters\system parameters) and service parameters.
system_parameters typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, SystemParametersProperty]]] Property systemParameters: The system parameters.
tags typing.List[TagsProperty] Property tags: Tags to attach to instance.
web_socket_api_type typing.Union[str, ros_cdk_core.IResolvable] Property webSocketApiType: The type of the two-way communication API.

api_nameRequired

api_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property apiName: The name of the API.Need [4, 50] Chinese\English\Number characters or "_",and should start with Chinese\/English character.


group_idRequired

group_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property groupId: The id of the Group.


request_configRequired

request_config: typing.Union[IResolvable, RequestConfigProperty]

Property requestConfig: The configuration of the request.


result_sampleRequired

result_sample: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resultSample: The sample of the result.


result_typeRequired

result_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resultType: The format of service's response, "JSON", "TEXT", "BINARY", "XML", "HTML" or "PASSTHROUGH".

Default is "JSON".


service_configRequired

service_config: typing.Union[IResolvable, ServiceConfigProperty]

Property serviceConfig: The configuration of the service.


visibilityRequired

visibility: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property visibility: Whether to make the API public.

"PUBLIC" or "PRIVATE".


allow_signature_methodOptional

allow_signature_method: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property allowSignatureMethod: If the AuthType is APP authentication, you need to pass this value to specify the signature algorithm.

If you do not specify this parameter, the default value HmacSHA256 is used. Valid values: HmacSHA256 HmacSHA1,HmacSHA256


app_code_auth_typeOptional

app_code_auth_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property appCodeAuthType: When AuthType is APP authentication, the optional values are as follows: If not passed, the default value is DEFAULT: DEFAULT: Default (set by group).

DISABLE: Not allowed HEADER: Allow AppCode header authentication HEADER_QUERY: Allow AppCode header and query authentication


auth_typeOptional

auth_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property authType: Type of authorization of the API .

"APP","ANONYMOUS", or "APPOPENID"


const_parametersOptional

const_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ConstParametersProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ConstParametersProperty]]]

Property constParameters: The const parameters.


descriptionOptional

description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: Description of the API, less than 180 characters.


disable_internetOptional

disable_internet: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property disableInternet: Set DisableInternet to true, only support intranet to call API.

Set DisableInternet to false, then the call is not restricted.


error_code_samplesOptional

error_code_samples: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ErrorCodeSamplesProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ErrorCodeSamplesProperty]]]

Property errorCodeSamples: The Error Code samples.


fail_result_sampleOptional

fail_result_sample: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property failResultSample: The sample of the fail result.


force_nonce_checkOptional

force_nonce_check: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property forceNonceCheck: Set ForceNonceCheck to true, compulsorily check X-Ca-Nonce when requesting, this is the unique identifier of the request, generally using UUID to identify.

The API gateway will verify the validity of this parameter after receiving this parameter. The same value can only be used once within 15 minutes. It can effectively prevent API replay attacks. Set ForceNonceCheck to false, then no check.


open_id_connect_configOptional

open_id_connect_config: typing.Union[IResolvable, OpenIdConnectConfigProperty]

Property openIdConnectConfig: The configuration of the open id.


request_parametersOptional

request_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, RequestParametersProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, RequestParametersProperty]]]

Property requestParameters: The request parameters.


result_body_modelOptional

result_body_model: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resultBodyModel: The return result of the API.


result_descriptionsOptional

result_descriptions: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resultDescriptions: The return description of the API.


service_parametersOptional

service_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ServiceParametersProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ServiceParametersProperty]]]

Property serviceParameters: The service parameters.


service_parameters_mapOptional

service_parameters_map: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ServiceParametersMapProperty]]]

Property serviceParametersMap: The mapping relation between (request parameters\const parameters\system parameters) and service parameters.


system_parametersOptional

system_parameters: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, SystemParametersProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, SystemParametersProperty]]]

Property systemParameters: The system parameters.


tagsOptional

tags: typing.List[TagsProperty]

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


web_socket_api_typeOptional

web_socket_api_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property webSocketApiType: The type of the two-way communication API.

COMMON: common API REGISTER: registered API UNREGISTER: unregistered API NOTIFY: downstream notification API