ApiProps
Properties for defining a Api.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-apigateway-api
Initializer
import { ApiProps } from '@alicloud/ros-cdk-apigateway'
const apiProps: ApiProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
apiName |
string | @alicloud/ros-cdk-core.IResolvable |
Property apiName: The name of the API.It must be 4 to 128 characters in length, and can contain letters, digits, underscores (_), dashes (-), spaces and dots (.), It must start with a letter. |
groupId |
string | @alicloud/ros-cdk-core.IResolvable |
Property groupId: The id of the Group. |
requestConfig |
@alicloud/ros-cdk-core.IResolvable | RequestConfigProperty |
Property requestConfig: The configuration of the request. |
serviceConfig |
@alicloud/ros-cdk-core.IResolvable | ServiceConfigProperty |
Property serviceConfig: The configuration of the service. |
visibility |
string | @alicloud/ros-cdk-core.IResolvable |
Property visibility: Whether to make the API public. |
allowSignatureMethod |
string | @alicloud/ros-cdk-core.IResolvable |
Property allowSignatureMethod: If the AuthType is APP authentication, you need to pass this value to specify the signature algorithm. |
appCodeAuthType |
string | @alicloud/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). |
authType |
string | @alicloud/ros-cdk-core.IResolvable |
Property authType: Type of authorization of the API . |
constParameters |
@alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ConstParametersProperty[] |
Property constParameters: The const parameters. |
description |
string | @alicloud/ros-cdk-core.IResolvable |
Property description: Description of the API, less than 180 characters. |
disableInternet |
boolean | @alicloud/ros-cdk-core.IResolvable |
Property disableInternet: Set DisableInternet to true, only support intranet to call API. |
errorCodeSamples |
@alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ErrorCodeSamplesProperty[] |
Property errorCodeSamples: The Error Code samples. |
failResultSample |
string | @alicloud/ros-cdk-core.IResolvable |
Property failResultSample: The sample of the fail result. |
forceNonceCheck |
boolean | @alicloud/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. |
openIdConnectConfig |
@alicloud/ros-cdk-core.IResolvable | OpenIdConnectConfigProperty |
Property openIdConnectConfig: The configuration of the open id. |
requestParameters |
@alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | RequestParametersProperty[] |
Property requestParameters: The request parameters. |
resultBodyModel |
string | @alicloud/ros-cdk-core.IResolvable |
Property resultBodyModel: The return result of the API. |
resultDescriptions |
string | @alicloud/ros-cdk-core.IResolvable |
Property resultDescriptions: The return description of the API. |
resultSample |
string | @alicloud/ros-cdk-core.IResolvable |
Property resultSample: The sample of the result. |
resultType |
string | @alicloud/ros-cdk-core.IResolvable |
Property resultType: The format of service's response, "JSON", "TEXT", "BINARY", "XML", "HTML" or "PASSTHROUGH". |
serviceParameters |
@alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ServiceParametersProperty[] |
Property serviceParameters: The service parameters. |
serviceParametersMap |
@alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ServiceParametersMapProperty[] |
Property serviceParametersMap: The mapping relation between (request parameters\const parameters\system parameters) and service parameters. |
systemParameters |
@alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | SystemParametersProperty[] |
Property systemParameters: The system parameters. |
tags |
TagsProperty[] |
Property tags: Tags to attach to instance. |
webSocketApiType |
string | @alicloud/ros-cdk-core.IResolvable |
Property webSocketApiType: The type of the two-way communication API. |
apiNameRequired
public readonly apiName: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property apiName: The name of the API.It must be 4 to 128 characters in length, and can contain letters, digits, underscores (_), dashes (-), spaces and dots (.), It must start with a letter.
groupIdRequired
public readonly groupId: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property groupId: The id of the Group.
requestConfigRequired
public readonly requestConfig: IResolvable | RequestConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | RequestConfigProperty
Property requestConfig: The configuration of the request.
serviceConfigRequired
public readonly serviceConfig: IResolvable | ServiceConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | ServiceConfigProperty
Property serviceConfig: The configuration of the service.
visibilityRequired
public readonly visibility: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property visibility: Whether to make the API public.
"PUBLIC" or "PRIVATE".
allowSignatureMethodOptional
public readonly allowSignatureMethod: string | IResolvable;
- Type: string | @alicloud/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
appCodeAuthTypeOptional
public readonly appCodeAuthType: string | IResolvable;
- Type: string | @alicloud/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
authTypeOptional
public readonly authType: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property authType: Type of authorization of the API .
"APP","ANONYMOUS", or "APPOPENID"
constParametersOptional
public readonly constParameters: IResolvable | IResolvable | ConstParametersProperty[];
- Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ConstParametersProperty[]
Property constParameters: The const parameters.
descriptionOptional
public readonly description: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property description: Description of the API, less than 180 characters.
disableInternetOptional
public readonly disableInternet: boolean | IResolvable;
- Type: boolean | @alicloud/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.
errorCodeSamplesOptional
public readonly errorCodeSamples: IResolvable | IResolvable | ErrorCodeSamplesProperty[];
- Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ErrorCodeSamplesProperty[]
Property errorCodeSamples: The Error Code samples.
failResultSampleOptional
public readonly failResultSample: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property failResultSample: The sample of the fail result.
forceNonceCheckOptional
public readonly forceNonceCheck: boolean | IResolvable;
- Type: boolean | @alicloud/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.
openIdConnectConfigOptional
public readonly openIdConnectConfig: IResolvable | OpenIdConnectConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | OpenIdConnectConfigProperty
Property openIdConnectConfig: The configuration of the open id.
requestParametersOptional
public readonly requestParameters: IResolvable | IResolvable | RequestParametersProperty[];
- Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | RequestParametersProperty[]
Property requestParameters: The request parameters.
resultBodyModelOptional
public readonly resultBodyModel: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property resultBodyModel: The return result of the API.
resultDescriptionsOptional
public readonly resultDescriptions: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property resultDescriptions: The return description of the API.
resultSampleOptional
public readonly resultSample: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property resultSample: The sample of the result.
resultTypeOptional
public readonly resultType: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property resultType: The format of service's response, "JSON", "TEXT", "BINARY", "XML", "HTML" or "PASSTHROUGH".
Default is "JSON".
serviceParametersOptional
public readonly serviceParameters: IResolvable | IResolvable | ServiceParametersProperty[];
- Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ServiceParametersProperty[]
Property serviceParameters: The service parameters.
serviceParametersMapOptional
public readonly serviceParametersMap: IResolvable | IResolvable | ServiceParametersMapProperty[];
- Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ServiceParametersMapProperty[]
Property serviceParametersMap: The mapping relation between (request parameters\const parameters\system parameters) and service parameters.
systemParametersOptional
public readonly systemParameters: IResolvable | IResolvable | SystemParametersProperty[];
- Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | SystemParametersProperty[]
Property systemParameters: The system parameters.
tagsOptional
public readonly tags: TagsProperty[];
- Type: 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.
webSocketApiTypeOptional
public readonly webSocketApiType: string | IResolvable;
- Type: string | @alicloud/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