All Products
Search
Document Center

Cloud Storage Gateway:ValidateGatewayName

Last Updated:Sep 18, 2024

Checks whether a gateway name already exists in a gateway cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes ValidateGatewayName

The operation that you want to perform. Set the value to ValidateGatewayName.

StorageBundleId String Yes sb-0001b2otnkdxrigeq***

The ID of the gateway cluster.

Name String Yes alex***

The name of the gateway. The following rules apply:

  • The name must be 1 to 60 characters in length.
  • It must start with a letter.
  • It can contain letters, digits, periods (.), hyphens (-), and underscores (_).

Response parameters

Parameter

Type

Example

Description

Message String successful

The description of the request result.

RequestId String CB300009-3850-4107-B291-59BDB4EDA183

The request ID.

Code String 200

The status code. The status code 200 indicates that the request was successful.

Success Boolean true

Indicates whether the request was successful.

IsValid Boolean true

Indicates whether the name of the gateway already exists in the gateway cluster. Valid values:

  • true:
  • false

Examples

Sample requests

http(s)://[Endpoint]/?Action=ValidateGatewayName
&StorageBundleId=sb-0001b2otnkdxrigeq***
&Name=alex***
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ValidateGatewayNameResponse>
    <Message>successful</Message>
    <RequestId>CB300009-3850-4107-B291-59BDB4EDA183</RequestId>
    <Code>200</Code>
    <Success>true</Success>
    <IsValid>true</IsValid>
</ValidateGatewayNameResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Message" : "successful",
  "RequestId" : "CB300009-3850-4107-B291-59BDB4EDA183",
  "Code" : "200",
  "Success" : true,
  "IsValid" : true
}

Error codes

HTTP status code

Error code

Error message

Description

400 EmptyStorageBundleId You must enter a valid ID for the gateway cluster. No gateway cluster ID is specified.
400 EmptyGatewayName You must enter a valid name for the gateway. No gateway name is specified.
400 InvalidGatewayName The specified name of the gateway is invalid. The name must be 1 to 60 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. The name of the gateway is invalid. The name must be 1 to 60 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.
404 StorageBundleNotExist The name you specified for the gateway cluster does not exist. You must specify a valid parameter. The specified gateway cluster does not exist.

For a list of error codes, see Service error codes.