public class CreateApiRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
allowSignatureMethod
If the **AuthType** is **APP** authentication, you need to pass this value to specify the signature algorithm.
|
String |
apiName
The name of the API that you want to create.
|
String |
appCodeAuthType
If **AuthType** is set to **APP**, the valid values are:
* **DEFAULT**: The default value that is used if no other values are passed. |
String |
authType
API安全认证类型,目前可以取值:
- **APP**:只允许已授权的APP调用 - **ANONYMOUS**:允许匿名调用,设置为允许匿名调用需要注意: 任何能够获取该API服务信息的人,都将能够调用该API。 |
Boolean |
backendEnable
Specifies whether to enable backend services.
|
String |
backendId
The IDof the backend service
|
String |
constantParameters
The parameters of the API.
|
String |
description
The description of the API.
|
Boolean |
disableInternet
* Specifies whether to set **DisableInternet** to **true** to limit API calls to within the VPC.
|
String |
errorCodeSamples
The sample error codes returned by the backend service.
|
String |
failResultSample
The sample error response from the backend service.
|
Boolean |
forceNonceCheck
* Specifies whether to set **ForceNonceCheck** to **true** to force the check of X-Ca-Nonce during the request.
|
String |
groupId
The ID of the API group.
|
String |
openIdConnectConfig
The switch status of ACL.
|
String |
requestConfig
The configuration items of API requests sent by the consumer to API Gateway.
|
String |
requestParameters
The parameters of API requests sent by the consumer to API Gateway.
|
String |
resultBodyModel
The return description of the API.
|
String |
resultDescriptions
The return description of the API.
|
String |
resultSample
The sample response from the backend service.
|
String |
resultType
The format of the response from the backend service.
|
String |
securityToken |
String |
serviceConfig
The configuration items of API requests sent by API Gateway to the backend service.
|
String |
serviceParameters
The parameters of API requests sent by API Gateway to the backend service.
|
String |
serviceParametersMap
The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.
|
String |
systemParameters
The common parameters of APIs in JSON format.
|
String |
visibility
Specifies whether to make the API public.
|
String |
webSocketApiType
The type of the two-way communication API.
|
| 构造器和说明 |
|---|
CreateApiRequest() |
@NameInMap(value="AllowSignatureMethod") public String 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
@NameInMap(value="ApiName") public String apiName
The name of the API that you want to create. The name must be unique within the API group. The name must be 4 to 50 characters in length. It must start with a letter and can contain letters, digits, and underscores (\_).
@NameInMap(value="AppCodeAuthType") public String appCodeAuthType
If **AuthType** is set to **APP**, the valid values are:
* **DEFAULT**: The default value that is used if no other values are passed. This value means that the setting of the group is used.
* **DISABLE**: The authentication is disabled.
* **HEADER**: AppCode can be placed in the Header parameter for authentication.
* **HEADER_QUERY**: AppCode can be placed in the Header or Query parameter for authentication.
@NameInMap(value="AuthType") public String authType
API安全认证类型,目前可以取值:
- **APP**:只允许已授权的APP调用
- **ANONYMOUS**:允许匿名调用,设置为允许匿名调用需要注意:
任何能够获取该API服务信息的人,都将能够调用该API。网关不会对调用者做身份认证,也无法设置按用户的流量控制,若开放该API请设置好按API的流量控制。
@NameInMap(value="BackendEnable") public Boolean backendEnable
Specifies whether to enable backend services.
@NameInMap(value="BackendId") public String backendId
The IDof the backend service
@NameInMap(value="ConstantParameters") public String constantParameters
The parameters of the API.
@NameInMap(value="Description") public String description
The description of the API. The description can be up to 180 characters in length.
@NameInMap(value="DisableInternet") public Boolean disableInternet
* Specifies whether to set **DisableInternet** to **true** to limit API calls to within the VPC.
* If you set **DisableInternet** to **false**, the limit is lifted. The default value is false when you create an API.
@NameInMap(value="ErrorCodeSamples") public String errorCodeSamples
The sample error codes returned by the backend service.
For more information, see [ErrorCodeSample](~~44392~~).
@NameInMap(value="FailResultSample") public String failResultSample
The sample error response from the backend service.
@NameInMap(value="ForceNonceCheck") public Boolean forceNonceCheck
* Specifies whether to set **ForceNonceCheck** to **true** to force the check of X-Ca-Nonce during the request. This is the unique identifier of the request and is generally identified by UUID. After receiving this parameter, API Gateway verifies the validity of this parameter. The same value can be used only once within 15 minutes. This helps prevent replay attacks.
* If you set **ForceNonceCheck** to **false**, the check is not performed. The default value is false when you create an API.
@NameInMap(value="GroupId") public String groupId
The ID of the API group.
@NameInMap(value="OpenIdConnectConfig") public String openIdConnectConfig
The switch status of ACL. Valid values:- **on** and **off**.
@NameInMap(value="RequestConfig") public String requestConfig
The configuration items of API requests sent by the consumer to API Gateway.
For more information, see [RequestConfig](~~43985~~).
@NameInMap(value="RequestParameters") public String requestParameters
The parameters of API requests sent by the consumer to API Gateway.
For more information, see [RequestParameter](~~43986~~).
@NameInMap(value="ResultBodyModel") public String resultBodyModel
The return description of the API.
@NameInMap(value="ResultDescriptions") public String resultDescriptions
The return description of the API.
@NameInMap(value="ResultSample") public String resultSample
The sample response from the backend service.
@NameInMap(value="ResultType") public String resultType
The format of the response from the backend service. Valid values: JSON, TEXT, BINARY, XML, and HTML. Default value: JSON.
@NameInMap(value="SecurityToken") public String securityToken
@NameInMap(value="ServiceConfig") public String serviceConfig
The configuration items of API requests sent by API Gateway to the backend service.
For more information, see [ServiceConfig](~~43987~~).
@NameInMap(value="ServiceParameters") public String serviceParameters
The parameters of API requests sent by API Gateway to the backend service.
For more information, see [ServiceParameter](~~43988~~).
@NameInMap(value="ServiceParametersMap") public String serviceParametersMap
The mappings between parameters of requests sent by the consumer to API Gateway and parameters of requests sent by API Gateway to the backend service.
For more information, see [ServiceParameterMap](~~43989~~).
@NameInMap(value="SystemParameters") public String systemParameters
The common parameters of APIs in JSON format.
@NameInMap(value="Visibility") public String visibility
Specifies whether to make the API public. Valid values:
* **PUBLIC**: Make the API public. If you set this parameter to PUBLIC, this API is displayed on the APIs page for all users after the API is published to the production environment.
* **PRIVATE**: Make the API private. Private APIs are not displayed in the Alibaba Cloud Marketplace after the API group to which they belong is made available.
@NameInMap(value="WebSocketApiType") public String webSocketApiType
The type of the two-way communication API.
* **COMMON**: normal APIs
* **REGISTER**: registered APIs
* **UNREGISTER**: unregistered APIs
* **NOTIFY**: downstream notification APIs
For more information, see [Two-way communication](~~66031~~).
public static CreateApiRequest build(Map<String,?> map) throws Exception
Exceptionpublic CreateApiRequest setAllowSignatureMethod(String allowSignatureMethod)
public String getAllowSignatureMethod()
public CreateApiRequest setApiName(String apiName)
public String getApiName()
public CreateApiRequest setAppCodeAuthType(String appCodeAuthType)
public String getAppCodeAuthType()
public CreateApiRequest setAuthType(String authType)
public String getAuthType()
public CreateApiRequest setBackendEnable(Boolean backendEnable)
public Boolean getBackendEnable()
public CreateApiRequest setBackendId(String backendId)
public String getBackendId()
public CreateApiRequest setConstantParameters(String constantParameters)
public String getConstantParameters()
public CreateApiRequest setDescription(String description)
public String getDescription()
public CreateApiRequest setDisableInternet(Boolean disableInternet)
public Boolean getDisableInternet()
public CreateApiRequest setErrorCodeSamples(String errorCodeSamples)
public String getErrorCodeSamples()
public CreateApiRequest setFailResultSample(String failResultSample)
public String getFailResultSample()
public CreateApiRequest setForceNonceCheck(Boolean forceNonceCheck)
public Boolean getForceNonceCheck()
public CreateApiRequest setGroupId(String groupId)
public String getGroupId()
public CreateApiRequest setOpenIdConnectConfig(String openIdConnectConfig)
public String getOpenIdConnectConfig()
public CreateApiRequest setRequestConfig(String requestConfig)
public String getRequestConfig()
public CreateApiRequest setRequestParameters(String requestParameters)
public String getRequestParameters()
public CreateApiRequest setResultBodyModel(String resultBodyModel)
public String getResultBodyModel()
public CreateApiRequest setResultDescriptions(String resultDescriptions)
public String getResultDescriptions()
public CreateApiRequest setResultSample(String resultSample)
public String getResultSample()
public CreateApiRequest setResultType(String resultType)
public String getResultType()
public CreateApiRequest setSecurityToken(String securityToken)
public String getSecurityToken()
public CreateApiRequest setServiceConfig(String serviceConfig)
public String getServiceConfig()
public CreateApiRequest setServiceParameters(String serviceParameters)
public String getServiceParameters()
public CreateApiRequest setServiceParametersMap(String serviceParametersMap)
public String getServiceParametersMap()
public CreateApiRequest setSystemParameters(String systemParameters)
public String getSystemParameters()
public CreateApiRequest setVisibility(String visibility)
public String getVisibility()
public CreateApiRequest setWebSocketApiType(String webSocketApiType)
public String getWebSocketApiType()
Copyright © 2023. All rights reserved.