다음을 통해 공유


REST API를 사용하여 Oracle용 애플리케이션 볼륨 그룹 구성

이 문서에서는 REST API를 사용하여 Oracle용 AVG(애플리케이션 볼륨 그룹)를 만드는 방법을 설명합니다. 세부 정보에는 선택한 매개 변수 및 배포에 필요한 속성이 포함됩니다. 이 문서에서는 해당하는 경우 Oracle용 AVG 생성에 대한 제약 조건과 일반적인 값도 지정합니다.

애플리케이션 볼륨 그룹 create

create 요청에서는 다음 URI 형식을 사용합니다.

/subscriptions/<subscriptionId>/providers/Microsoft.NetApp/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.NetApp/netAppAccounts/<accountName>/volumeGroups/<volumeGroupName>?api-version=<apiVersion>

URI 매개 변수 설명 Oracle AVG에 대한 제한 사항
subscriptionId 구독 ID 없음
resourceGroupName 리소스 그룹 이름 없음
accountName NetApp 계정 이름 없음
volumeGroupName 볼륨 그룹 이름 권장하는 형식은 <SID>-<Name>

- SID: 고유 식별자입니다. Oracle 고유 시스템 ID에는 영숫자 문자, 하이픈('-') 및 밑줄('_')만 포함될 수 있습니다. 최소 3자에서 최대 12자 문자열이어야 하며 문자로 시작해야 합니다.

- 이름: 선택한 문자열입니다.

예: ORA-Testing
apiVersion API 버전 2023-05-01 이상이어야 합니다.

요청 본문

요청 본문은 외부 매개 변수, 그룹 속성 및 만들 볼륨으로 구성되며, 각 볼륨은 개별 외부 매개 변수와 볼륨 속성을 갖고 있습니다.

다음 표에서는 Oracle 배포를 만드는 데 필요한 요청 본문 매개 변수 및 그룹 수준 속성에 대해 설명합니다.

URI 매개 변수 설명 Oracle AVG에 대한 제한 사항
Location 애플리케이션 볼륨 그룹을 만들 지역 없음
그룹 속성
groupDescription 그룹에 대한 설명 자유 형식 문자열
applicationType 응용 프로그램 유형 Oracle용 AVG 배포에 ORACLE 사용
applicationIdentifier 애플리케이션별 식별자 문자열 Oracle의 경우 이 매개 변수는 고유한 시스템 ID입니다.
deploymentSpecId 특정 애플리케이션 볼륨 그룹 유형을 배포하는 규칙을 정의하는 배포 사양 식별자 다음이어야 합니다. 10542149-bfca-5618-1879-9863dc6767f1
volumes 만들 볼륨(볼륨 세부 정보는 다음 표 참조) Oracle 배포의 일부로 2~12개의 볼륨이 있을 수 있습니다.

- 필수: 1개 데이터 및 1개 로그

- 선택 사항: 2~8개 데이터, mir-log, 백업, 이진

다음 표에서는 Oracle 애플리케이션 볼륨 그룹에서 볼륨을 만들기 위한 요청 본문 매개 변수 및 볼륨 속성에 대해 설명합니다.

볼륨 수준 요청 매개 변수 설명 Oracle에 대한 제한 사항
name 그룹의 볼륨을 사용하여 데이터베이스를 식별하는 Oracle SID가 포함된 볼륨 이름 없음

예제 또는 권장하는 볼륨 이름:

- <sid>-ora-data1(데이터)
- <sid>-ora-data2(데이터)
- <sid>-ora-log(로그)
- <sid>-ora-log-mirror(mirlog)
- <sid>-ora-binary(이진)
- <sid>-ora-bakup(백업)
tags 볼륨 태그 None
zones 가용성 영역 Oracle AVG의 경우:

- 지역에 가용성 영역이 있는 경우 영역을 선택해야 합니다. 예: 영역(1, 2 또는 3).

- 지역에 사용 가능한 영역이 없고 PPG 사용이 활성화되지 않은 경우 고객은 지역 배포를 진행할 수 있습니다(PPG 활성화 필요).

볼륨 속성 설명 Oracle 값 제한 사항
creationToken 일반적으로 볼륨 이름과 동일한 경로 이름을 내보냅니다. <sid>-ora-data1
throughputMibps QoS 처리량 볼륨 유형에 따라 처리량을 1MiBps에서 4500MiBps 사이로 설정해야 합니다.
usageThreshhold 볼륨 크기(바이트)입니다. 이 값은 100GiB~100TiB여야 합니다. 예를 들어 100GiB = 107374182400 바이트입니다. 볼륨 크기를 바이트 단위로 설정해야 합니다.
exportPolicyRule 볼륨 내보내기 정책 규칙 Oracle에 대해 하나 이상의 내보내기 정책 규칙을 지정해야 합니다. Oracle에 대해 다음 규칙 값만 수정할 수 있습니다. 나머지에는 기본값이 있어야 합니다.

- unixReadOnly: false여야 합니다.

- unixReadWrite: true여야 합니다.

- allowedClients: 허용되는 클라이언트를 지정합니다. 제한하지 않으려면 0.0.0.0/0을 사용합니다.

- hasRootAccess: 설치에 루트 사용자를 사용하려면 true여야 합니다.

- chownMode: chown 모드를 지정합니다.

- Select nfsv41: or nfsv3:: true입니다. 모든 볼륨에 동일한 프로토콜 버전을 사용하는 것이 좋습니다.

그 외의 규칙 값은 반드시 기본값을 유지해야 합니다.
volumeSpecName 만들려는 애플리케이션 볼륨 그룹의 볼륨 유형을 지정합니다. Oracle 볼륨의 값은 다음 중 하나에 해당해야 합니다.

- ora-data1
- ora-data2
- ora-data3
- ora-data4
- ora-data5
- ora-data6
- ora-data7
- ora-data8
- ora-log
- ora-log-mirror
- ora-binary
- ora-backup
proximityPlacementGroup 볼륨의 적절한 배치를 위한 PPG(근접 배치 그룹)의 리소스 ID입니다. 이 매개 변수는 선택 사항입니다. 지역에 사용 가능한 영역이 있는 경우 영역 사용이 항상 우선 순위입니다. data, logmirror-log, ora-binarybackup 볼륨에는 각각 PPG가 지정되어 있어야 하며, 공통 PPG가 바람직합니다.
subnetId Azure NetApp Files에 위임된 서브넷 ID입니다. 서브넷 ID는 모든 볼륨에 대해 동일해야 합니다.
capacityPoolResourceId 용량 풀의 ID 용량 풀의 유형은 수동 QoS여야 합니다. 일반적으로 모든 Oracle 볼륨은 공통 용량 풀에 배치됩니다. 그러나 요구 사항은 아닙니다.
protocolTypes 사용할 프로토콜 이 매개 변수는 NFSv3 또는 NFSv4.1이어야 하며 이 표의 앞부분에서 설명한 내보내기 정책 규칙에 지정된 프로토콜과 일치해야 합니다.

예: Oracle API 요청 콘텐츠에 대한 애플리케이션 볼륨 그룹

이 섹션의 예제에서는 다양한 Oracle 구성의 볼륨 그룹 만들기 요청에서 전달된 값을 보여줍니다. 이 예제에서는 표에 설명된 것처럼 이름 지정, 크기 조정 및 값에 대한 모범 사례를 보여줍니다.

다음 예제에서는 선택한 자리 표시자를 지정합니다. 해당 값은 구성과 관련된 값으로 바꿔야 합니다. 이러한 값은 다음과 같습니다.

  • <SubscriptionId>:
    구독 ID가 표시됩니다. 예: 11111111-2222-3333-4444-555555555555
  • <ResourceGroup>:
    리소스 그룹. 예: TestResourceGroup
  • <NtapAccount>:
    NetApp 계정. 예: TestAccount
  • <VolumeGroupName>:
    볼륨 그룹 이름. 예: SH9-Test-00001
  • <SubnetId>:
    서브넷 리소스 ID. 예: /subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/SH9_Subnet
  • <CapacityPoolResourceId>:
    용량 풀 리소스 ID. 예: /subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/SH9_Pool

curl을 사용하여 Oracle용 애플리케이션 볼륨 그룹 만들기

다음 예제에 대한 Oracle 볼륨 그룹은 curl을 사용하여 API를 호출하는 샘플 셸 스크립트를 사용하여 만들 수 있습니다.

  1. 구독 ID를 추출합니다. 이 명령은 구독 ID의 추출을 자동화하고 권한 부여 토큰을 생성합니다.
    subId=$(az account list | jq ".[] | select (.name == \"Pay-As-You-Go\") | .id" -r)echo "Subscription ID: $subId" 
    
  2. 액세스 토큰을 만듭니다.
    response=$(az account get-access-token)token=$(echo $response | jq ".accessToken" -r)echo "Token: $token" 
    
  3. curl을 사용하여 REST API를 호출합니다.
    echo "---"curl -X PUT -H "Authorization: Bearer $token" -H "Content-Type:application/json" -H "Accept:application/json" -d @<ExampleJson> https://management.azure.com/subscriptions/$subId/resourceGroups/<ResourceGroup>/providers/Microsoft.NetApp/netAppAccounts/<NtapAccount>/volumeGroups/<VolumeGroupName>?api-version=2023-05-01 | jq . 
    

예: Oracle 만들기 요청에 대한 애플리케이션 볼륨 그룹

이 예제에서는 다음 볼륨을 사용하여 볼륨 그룹 이름 "group1"을 만듭니다.

  • test-ora-data1
  • test-ora-data2
  • test-ora-data3
  • test-ora-data4
  • test-ora-data5
  • test-ora-data6
  • test-ora-data7
  • test-ora-data8
  • test-ora-log
  • test-ora-log-mirror
  • test-ora-binary
  • test-ora-backup

JSON 템플릿을 sh9.json으로 저장합니다.

참고 항목

자리 표시자 <SubnetId><CapacityPoolResourceId>를 바꿔야 하며, 이 json을 배포용 템플릿으로 사용할 때 볼륨 데이터를 조정해야 합니다.

{ 
      "location": "westus", 
      "properties": { 
        "groupMetaData": { 
          "groupDescription": "Volume group", 
          "applicationType": "ORACLE", 
          "applicationIdentifier": "OR2" 
        }, 
        "volumes": [ 
          { 
            "name": "test-ora-data1", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": " OR2-ora-data1", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data1", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": "test-ora-data2", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": " OR2-ora-data2", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data2", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": "test-ora-data3", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": " OR2-ora-data3", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data3", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": "test-ora-data4", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": " OR2-ora-data4", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data4", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-data5", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-data5", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data5", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-data6", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-data6", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data6", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-data7", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-data7", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data7", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-data8", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-data8", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-data8", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-log", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-log", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-log", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-log-mirror", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-log-mirror", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-log-mirror", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-binary", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-binary", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-binary", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ] 
            } 
          }, 
          { 
            "name": " OR2-ora-backup", 
            "zones": [ 
              "1" 
            ], 
            "properties": { 
              "creationToken": "test-ora-backup", 
              "serviceLevel": "Premium", 
              "throughputMibps": 10, 
              "subnetId": <SubnetId>, 
              "usageThreshold": 107374182400, 
              "volumeSpecName": "ora-backup", 
              "capacityPoolResourceId": <CapacityPoolResourceId>, 
              "exportPolicy": { 
                "rules": [ 
                  { 
                    "ruleIndex": 1, 
                    "unixReadOnly": true, 
                    "unixReadWrite": true, 
                    "kerberos5ReadOnly": false, 
                    "kerberos5ReadWrite": false, 
                    "kerberos5iReadOnly": false, 
                    "kerberos5iReadWrite": false, 
                    "kerberos5pReadOnly": false, 
                    "kerberos5pReadWrite": false, 
                    "cifs": false, 
                    "nfsv3": false, 
                    "nfsv41": true, 
                    "allowedClients": "0.0.0.0/0", 
                    "hasRootAccess": true 
                  } 
                ] 
              }, 
              "protocolTypes": [ 
                "NFSv4.1" 
              ]
            }
          }
        ]
      }
    }
  }
}

스크립트 조정 및 시작

참고 항목

이제 이 json 입력 파일을 위의 스크립트와 함께 사용해야 합니다.

#! /bin/bash
# 1. Extract the subscription ID:
#
subId=$(az account list | jq ".[] | select (.name == \"Pay-As-You-Go\") | .id" -r)
echo "Subscription ID: $subId"
 
#
# 2. Create the access token:
#
response=$(az account get-access-token)
token=$(echo $response | jq ".accessToken" -r)
echo "Token: $token"
#
# 3. Call the REST API using curl
# 
echo "---"
curl -X PUT -H "Authorization: Bearer $token" -H "Content-Type:application/json" -H "Accept:application/json" -d @sh9.json https://management.azure.com/subscriptions/$subId/resourceGroups/rg-westus/providers/Microsoft.NetApp/netAppAccounts/ANF-WestUS-test/volumeGroups/test-ORA?api-version=2022-03-01 | jq .

샘플 결과

참고 항목

curl 호출이 끝날 때 | jq .를 사용하면 반환된 json의 형식이 잘 지정됩니다.

{
        "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/volumeGroups/group1",
        "name": "group1",
        "type": "Microsoft.NetApp/netAppAccounts/volumeGroups",
        "location": "westus",
        "properties": {
          "provisioningState": "Creating",
          "groupMetaData": {
            "groupDescription": "Volume group",
            "applicationType": "ORACLE",
            "applicationIdentifier": "OR2"
          },
          "volumes": [
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data1",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data1",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data1",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data1",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data2",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data2",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data2",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data2",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data3",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data3",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data3",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data3",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data4",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data4",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data4",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data4",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data5",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data5",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data5",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data5",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data6",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data6",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data6",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data6",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data7",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data7",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data7",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data7",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-data8",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-data8",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-data8",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-data8",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-log",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-log",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-log",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-log",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-log-mirror",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-log-mirror",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-log-mirror",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-log-mirror",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-binary",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-binary",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-binary",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-binary",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            },
            {
              "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/test-ora-backup",
              "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
              "name": "test-ora-backup",
              "zones": [
                "1"
              ],
              "properties": {
                "throughputMibps": 10.0,
                "volumeSpecName": "ora-backup",
                "serviceLevel": "Premium",
                "creationToken": "test-ora-backup",
                "usageThreshold": 107374182400,
                "subnetId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3",
                "exportPolicy": {
                  "rules": [
                    {
                      "ruleIndex": 1,
                      "unixReadOnly": true,
                      "unixReadWrite": true,
                      "kerberos5ReadOnly": false,
                      "kerberos5ReadWrite": false,
                      "kerberos5iReadOnly": false,
                      "kerberos5iReadWrite": false,
                      "kerberos5pReadOnly": false,
                      "kerberos5pReadWrite": false,
                      "cifs": false,
                      "nfsv3": false,
                      "nfsv41": true,
                      "allowedClients": "0.0.0.0/0",
                      "hasRootAccess": true
                    }
                  ]
                },
                "protocolTypes": [
                  "NFSv4.1"
                ]
              }
            }
          ]
        }
      }
    }
  }
}

다음 단계