getCloudRedisTargetSubnetList

Prev Next

VPC 환경에서 이용 가능합니다.

Cloud DB for Redis에서 사용할 수 있는 Subnet 리스트를 조회합니다.

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
GET, POST /getCloudRedisTargetSubnetList

요청 헤더

Cloud DB for Redis (VPC) API에서 공통으로 사용하는 헤더에 대한 자세한 내용은 Cloud DB for Redis (VPC) 요청 헤더를 참조해 주십시오.

요청 파라미터

파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
regionCode String Optional 조회할 Subnet의 리전 코드
  • getRegionList를 통해 확인
  • getRegionList 조회 결과의 첫 번째 리전(기본값)
vpcNo String Required VPC 번호로 필터링
cloudRedisImageProductCode String Required Cloud DB for Redis 이미지 상품 코드로 필터링
isPublic Boolean Optional Public Subnet 여부로 필터링
  • true | false
responseFormatType String Optional 응답 결과의 형식
  • xml (기본값) | json

요청 예시

요청 예시는 다음과 같습니다.

curl --location --request GET 'https://ncloud.apigw.gov-ntruss.com/vredis/v2/getCloudRedisTargetSubnetList
?regionCode=KR
?vpcNo=****83
?cloudRedisImageProductCode=SW.VDBAS.VRDS.LNX64.CNTOS.0708.REDIS.7015.B050'
--header 'x-ncp-apigw-timestamp: {Timestamp}'
--header 'x-ncp-iam-access-key: {Access Key}' 
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디는 TargetSubnetList를 참조해 주십시오.

응답 상태 코드

네이버 클라우드 플랫폼에서 공통으로 사용하는 응답 상태 코드에 대한 자세한 내용은 Ncloud API 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

  • responseFormatType=json 일 때
{
    "getCloudRedisTargetSubnetListResponse": {
        "totalRows": 3,
        "targetSubnetList": [
            {
                "subnetNo": "****91",
                "subnetName": "f**",
                "vpcNo": "****83",
                "vpcName": "te**",
                "zoneCode": "KR-1",
                "subnet": "192.168.1.0/28",
                "isPublic": false,
                "createdDate": "2024-05-28T09:44:21+0900"
            }
        ],
        "requestId": "7c37c61d-****-****-****-ae81a5bc3e9a",
        "returnCode": "0",
        "returnMessage": "success"
    }
}
  • responseFormatType=xml (기본값) 일 때
<?xml version="1.0" encoding="UTF-8"?>
<getCloudRedisTargetSubnetListResponse>
    <requestId>7c37c61d-****-****-****-ae81a5bc3e9a</requestId>
    <returnCode>0</returnCode>
    <returnMessage>success</returnMessage>
    <totalRows>1</totalRows>
    <targetSubnetList>
        <targetSubnet>
            <subnetNo>****91</subnetNo>
            <subnetName>f**</subnetName>
            <vpcNo>39**</vpcNo>
            <vpcName>te**</vpcName>
            <zoneCode>KR-1</zoneCode>
            <subnet>192.168.1.0/28</subnet>
            <isPublic>false</isPublic>
            <createdDate>2024-05-28T09:44:21+0900</createdDate>
        </targetSubnet>
    </targetSubnetList>
</getCloudRedisTargetSubnetListResponse>