az eventgrid event-subscription

이벤트 구독을 관리 합니다.

Event Grid 토픽, 도메인, 도메인 항목, Azure 구독, 리소스 그룹 또는 이벤트 알림을 지 원하는 기타 Azure 리소스에 대 한 이벤트 구독을 관리 합니다.

명령

az eventgrid event-subscription create

새 이벤트 구독을 만듭니다.

az eventgrid event-subscription delete

이벤트 구독 만들기를 삭제합니다.

az eventgrid event-subscription list

이벤트 구독을 나열 합니다.

az eventgrid event-subscription show

이벤트 구독의 세부 정보를 확인합니다.

az eventgrid event-subscription update

이벤트 구독을 업데이트합니다.

az eventgrid event-subscription create

새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name
                                       [--advanced-filter]
                                       [--azure-active-directory-application-id-or-uri]
                                       [--azure-active-directory-tenant-id]
                                       [--deadletter-endpoint]
                                       [--deadletter-identity {systemassigned}]
                                       [--deadletter-identity-endpoint]
                                       [--delivery-attribute-mapping]
                                       [--delivery-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--enable-advanced-filtering-on-arrays {false, true}]
                                       [--endpoint]
                                       [--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--event-delivery-schema {cloudeventschemav1_0, custominputschema, eventgridschema}]
                                       [--event-ttl]
                                       [--expiration-date]
                                       [--included-event-types]
                                       [--labels]
                                       [--max-delivery-attempts]
                                       [--max-events-per-batch]
                                       [--preferred-batch-size-in-kilobytes]
                                       [--qttl]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-case-sensitive {false, true}]
                                       [--subject-ends-with]
                                       [--subscription]

예제

기본 필터를 사용 하 여 Event Grid 항목에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

기본 필터를 사용 하 여 Azure 구독 구독에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

기본 필터를 사용 하 여 리소스 그룹에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

기본 필터를 사용 하 여 저장소 계정에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1"  \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

고급 필터를 사용 하 여 저장소 계정에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create  --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --advanced-filter data.blobType StringIn BlockBlob
    --advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net

주체 접두사를 지정 하는 필터를 사용 하 여 Azure 구독에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es4 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-begins-with mysubject_prefix

제목 접미사를 지정 하는 필터를 사용 하 여 리소스 그룹에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es5 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-ends-with mysubject_suffix

기본 필터 및 EventHub를 대상으로 사용 하 여 Azure 구독에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type eventhub \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/n1/eventhubs/EH1

기본 필터를 사용 하 고 대상으로 Azure Storage 큐를 사용 하 여 Azure 구독에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1

기본 필터 및 Azure ServiceBusQueue를 대상으로 사용 하 여 Azure 구독에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type servicebusqueue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/queues/queue1

기본 필터를 사용 하 고 CloudEvent V 1.0를 배달 스키마로 사용 하 여 Event Grid 도메인에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --event-delivery-schema cloudeventschemav1_0

최대 10 개의 배달 시도와 2 시간의 이벤트 TTL (이전에 발생 하는 작업)에 대 한 배달 못한 사람 대상과 사용자 지정 재시도 정책을 사용 하 여 저장소 계정에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 \
    --max-delivery-attempts 10 --event-ttl 120

도메인 항목에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1/topics/t1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

만료 날짜를 사용 하 여 저장소 계정에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/sa1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --expiration-date "2018-10-31"

대상으로 사용 되는 Azure Active Directory Webhook을 사용 하 여 Event Grid 항목에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --azure-active-directory-tenant-id azureactivedirectorytenantid
    --azure-active-directory-application-id-or-uri azureactivedirectoryapplicationidoruri

Azure Function을 대상으로 사용 하 여 Event Grid 항목에 대 한 새 이벤트 구독을 만듭니다.

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Web/sites/{functionappname}/functions/{functionname} --endpoint-type azurefunction

Systemassigned MSI id를 대상으로 사용 하 고 MSI id를 사용 하는 배달 못한 편지와 함께 Eventhub를 사용 하 여 Event Grid 항목에 대 한 새 이벤트 구독 만들기

az eventgrid event-subscription create --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --delivery-identity-endpoint-type eventhub --delivery-identity systemassigned --delivery-identity-endpoint /subscriptions/{SubId2|}/resourceGroups/{RG2}/providers/Microsoft.eventhub/namespaces/{EventHubNamespace}/eventhubs/{EventhubName} \
    --deadletter-identity-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 --deadletter-identity systemassigned -n {EventSubscriptionName}

5 분 동안 메시지 ttl을 사용 하 여 Storage 큐를 대상으로 하는 Event Grid 항목에 대 한 새 이벤트 구독 만들기

az eventgrid event-subscription create -n es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
    --storage-queue-msg-ttl 300

Systemassigned 된 MSI id를 대상으로 사용 하는 StorageQueue를 사용 하 여 Event Grid 항목에 대 한 새 이벤트 구독 만들기

az eventgrid event-subscription create -n {EventSubscriptionName} --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --delivery-identity-endpoint-type StorageQueue --delivery-identity systemassigned --delivery-identity-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
    --storage-queue-msg-ttl 300

배열에 고급 필터링을 사용 하는 Event Grid 항목에 대 한 새 이벤트 구독 만들기

az eventgrid event-subscription create -n es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
    --enable-advanced-filtering-on-arrays true

필수 매개 변수

--name -n

이벤트 구독의 이름입니다.

선택적 매개 변수

--advanced-filter

고급 필터를 사용 하면 특정 이벤트 속성을 기반으로 이벤트를 필터링 할 수 있습니다.

--azure-active-directory-application-id-or-uri

배달 요청에서 전달자 토큰으로 포함 될 액세스 토큰을 가져올 Azure Active Directory 응용 프로그램 Id 또는 Uri입니다. 대상으로 서 webhook에만 적용 가능 합니다.

--azure-active-directory-tenant-id

배달 요청에서 전달자 토큰으로 포함 될 액세스 토큰을 가져오기 위한 Azure Active Directory 테 넌 트 Id입니다. 대상으로 서 webhook에만 적용 가능 합니다.

--deadletter-endpoint

이 이벤트 구독에 대해 eventgrid가 배달할 수가 없는 이벤트를 배달 하지 못한 Azure Storage blob 컨테이너 대상의 Azure 리소스 ID입니다.

--deadletter-identity

배달 못한 대상 리소스의 id 유형입니다.

허용되는 값: systemassigned
--deadletter-identity-endpoint

eventgrid가이 이벤트 구독에 대해 배달할 배달 되지 않은 이벤트를 배달 해야 하는 id를 가진 Azure Storage blob 컨테이너 대상의 Azure 리소스 ID입니다.

--delivery-attribute-mapping

이벤트를 전달할 때 HTTP 헤더를 통해 추가 정보를 보낼 배달 특성 매핑을 추가 합니다. 이 특성은 StorageQueue를 제외한 모든 대상 유형에 유효 합니다. 둘 이상의 인수를 사용 하 여 여러 특성을 지정할 수 있습니다 --delivery-attribute-mapping .

--delivery-identity

배달 대상 리소스 (예: 저장소 큐 또는 eventhub)의 id 유형입니다.

허용되는 값: systemassigned
--delivery-identity-endpoint

EventGrid가이 이벤트 구독과 일치 하는 이벤트를 제공 해야 하는 id가 있는 끝점입니다. Webhook 끝점 형식의 경우 해당 webhook URL 이어야 합니다. 다른 끝점 형식의 경우 끝점의 Azure 리소스 식별자 여야 합니다.

--delivery-identity-endpoint-type

리소스 id를 사용 하는 대상 끝점의 형식입니다.

허용되는 값: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--enable-advanced-filtering-on-arrays --enable-af-arr

단일 값을 예상 하지 않고 값 배열에 대해 고급 필터를 평가할 수 있습니다.

허용되는 값: false, true
--endpoint

EventGrid가이 이벤트 구독과 일치 하는 이벤트를 제공 해야 하는 끝점입니다. Webhook 끝점 형식의 경우 해당 webhook URL 이어야 합니다. 다른 끝점 형식의 경우 끝점의 Azure 리소스 식별자 여야 합니다. Event Grid 명령을 실행 하기 전에 대상 끝점을 이미 만들고 사용할 수 있어야 합니다.

--endpoint-type

대상 끝점의 형식입니다.

허용되는 값: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
기본값: webhook
--event-delivery-schema

이 이벤트 구독에 대해 이벤트를 전달 해야 하는 스키마입니다. 기본적으로 이벤트는 해당 항목의 입력 스키마에 따라 게시 된 동일한 스키마에 배달 됩니다.

허용되는 값: cloudeventschemav1_0, custominputschema, eventgridschema
--event-ttl

이벤트 ttl (time to live) (분)입니다. 1에서 1440 사이의 숫자 여야 합니다.

기본값: 1440
--expiration-date

날짜 또는 날짜/시간 (UTC, 예: ' 2018-11-30T11:59:59 + 00:00 ' 또는 ' 2018-11-30 ') 후에 이벤트 구독이 만료 됩니다. 기본적으로 이벤트 구독은 만료 되지 않습니다.

--included-event-types

공백으로 구분 된 이벤트 유형 목록 (예: Microsoft. Storage입니다. BlobCreated 및 Microsoft. Storage. BlobDeleted). 모든 기본 이벤트 유형을 구독 하려면이 인수에 값을 지정 하지 마십시오. Event grid 토픽의 경우 이벤트 유형은 customer로 정의 됩니다. Azure 이벤트 (예: Storage 계정, IoT Hub 등)의 경우이 CLI 명령 ' az event grid 토픽-type list-i n t e r t e r '를 사용 하 여 해당 이벤트 유형을 쿼리할 수 있습니다.

--labels

이 이벤트 구독과 연결할 공백으로 구분 된 레이블 목록입니다.

--max-delivery-attempts

최대 배달 시도 횟수입니다. 1에서 30 사이의 숫자 여야 합니다.

기본값: 30
--max-events-per-batch

일괄 처리의 최대 이벤트 수입니다. 값은 1에서 5000 사이의 숫자여야 합니다.

--preferred-batch-size-in-kilobytes

기본 배치 크기 (kb)입니다. 값은 1에서 1024 사이의 숫자여야 합니다.

--qttl --storage-queue-msg-ttl

큐 메시지 ttl (time to live)을 초 단위로 Storage 합니다.

--source-resource-id

이벤트 구독을 만들어야 하는 Azure 리소스의 정규화 된 식별자입니다.

--subject-begins-with

접두사를 기반으로 이벤트 구독의 이벤트를 필터링 하는 선택적 문자열입니다. 와일드카드 문자는 지원되지 않습니다.

--subject-case-sensitive

대/소문자 구분 방식으로 제목 필드를 비교할지 여부를 지정 하려면를 지정 합니다. 플래그가 있으면 True입니다.

허용되는 값: false, true
--subject-ends-with

접미사를 기준으로 이벤트 구독의 이벤트를 필터링 하는 선택적 문자열입니다. 와일드카드 문자는 지원되지 않습니다.

--subscription

구독의 이름 또는 ID입니다. 을 사용 하 여 기본 구독을 구성할 수 있습니다 az account set -s NAME_OR_ID .

az eventgrid event-subscription delete

이벤트 구독 만들기를 삭제합니다.

az eventgrid event-subscription delete --name
                                       [--source-resource-id]
                                       [--subscription]

예제

Event Grid 항목에 대 한 이벤트 구독을 삭제 합니다.

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

Event Grid 도메인 항목에 대 한 이벤트 구독을 삭제 합니다.

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1/topics/topic1

Event Grid 도메인에 대 한 이벤트 구독을 삭제 합니다.

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1

Azure 구독에 대 한 이벤트 구독을 삭제 합니다.

az eventgrid event-subscription delete --name es2 \
    --source-resource-id /subscriptions/{SubID}

리소스 그룹에 대 한 이벤트 구독을 삭제 합니다.

az eventgrid event-subscription delete --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}

저장소 계정에 대 한 이벤트 구독을 삭제 합니다.

az eventgrid event-subscription delete --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/microsoft.storage/storageaccounts/kalsegblob

필수 매개 변수

--name -n

이벤트 구독의 이름입니다.

선택적 매개 변수

--source-resource-id

해당 이벤트 구독을 삭제 해야 하는 Azure 리소스의 정규화 된 식별자입니다.

--subscription

구독의 이름 또는 ID입니다. 을 사용 하 여 기본 구독을 구성할 수 있습니다 az account set -s NAME_OR_ID .

az eventgrid event-subscription list

이벤트 구독을 나열 합니다.

Event Grid는 지역 및 글로벌 이벤트 구독을 모두 지원 합니다. 지역 리소스 (예: Storage 계정 또는 Event Grid 항목)에 대 한 이벤트 구독은 지역 이지만 글로벌 리소스 (예: Azure 구독 또는 리소스 그룹)에 대 한 이벤트 구독은 전역입니다. 따라서 다음과 같은 몇 가지 방법으로 이벤트 구독을 나열할 수 있습니다.

  1. 나열할 이벤트 구독을 포함 하는 리소스의 리소스 ID를 나열 하려면--source-ID 매개 변수를 지정 합니다. 다른 매개 변수는 지정 하지 않아야 합니다.
  2. 토픽 유형 (예: 저장소 계정)으로 나열 하려면--location (예: "westus2") 매개 변수와 함께--토픽 유형 매개 변수를 지정 합니다. 전역 토픽 유형 (예: "Microsoft .Resources")의 경우 위치 값을 "global"로 지정 합니다.
  3. 모든 항목 유형에 서 지역에서 모든 이벤트 구독을 나열 하려면--location 매개 변수만 지정 합니다.
  4. 위의 #2와 #3 모두에 대해 리소스 그룹을 기준으로 필터링 하려면--resource group 매개 변수를 추가로 지정할 수 있습니다.
az eventgrid event-subscription list [--location]
                                     [--odata-query]
                                     [--query-examples]
                                     [--resource-group]
                                     [--source-resource-id]
                                     [--subscription]
                                     [--topic-type-name]

예제

Event Grid 토픽에 대해 생성 된 모든 이벤트 구독을 나열 합니다.

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

저장소 계정에 대해 생성 된 모든 이벤트 구독을 나열 합니다.

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob

Azure 구독에 대해 만든 모든 이벤트 구독을 나열합니다.

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}

리소스 그룹에 대해 만든 모든 이벤트 구독을 나열합니다.

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}

Event Grid 도메인에 대한 모든 이벤트 구독을 나열합니다.

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1

Event Grid 도메인 토픽에 대한 모든 이벤트 구독을 나열합니다.

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1/topics/topic1

westus2의 모든 Storage 이벤트 구독(현재 선택한 Azure 구독 아래)을 나열합니다.

az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2

westus2의 모든 Storage 이벤트 구독(지정된 리소스 그룹 아래)을 나열합니다.

az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2 --resource-group {RG}

현재 선택한 Azure 구독에서 모든 지역 또는 글로벌 이벤트 구독을 나열합니다.

az eventgrid event-subscription list --location westus2
az eventgrid event-subscription list --location global

지정된 리소스 그룹에서 모든 지역 또는 전역 이벤트 구독을 나열합니다.

az eventgrid event-subscription list --location westus2 --resource-group {RG}
az eventgrid event-subscription list --location global --resource-group {RG}

이름에 "XYZ" 패턴이 포함된 Event Grid 도메인에 대한 모든 이벤트 구독 나열

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 --odata-query "Contains(name, 'XYZ')"

이름이 "name1"인 이벤트 구독을 제외하고 Event Grid 도메인에 대한 모든 이벤트 구독을 나열합니다.

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 --odata-query "NOT (name eq 'name1')"

선택적 매개 변수

--location -l

위치입니다. 값 출처: az account list-locations. az configure --defaults location=<location>을 사용하여 기본 위치를 구성할 수 있습니다.

--odata-query

목록 결과를 필터링하는 데 사용되는 OData 쿼리입니다. 필터링은 현재 Name 속성에서만 허용됩니다. 지원되는 작업에는 CONTAINS, eq(같음), ne(같지 않음), AND 및 NOT이 포함됩니다.

--query-examples

JMESPath 문자열을 권장합니다. 쿼리 중 하나를 복사하여 큰따옴표 안에 --query 매개 변수를 붙여넣어 결과를 볼 수 있습니다. 이러한 키워드를 기반으로 제안을 제공할 수 있도록 하나 이상의 위치 키워드를 추가할 수 있습니다.

--resource-group -g

리소스 그룹의 이름입니다. az configure --defaults group=<name>을 사용하여 기본 그룹을 구성할 수 있습니다.

--source-resource-id

이벤트 구독을 나열해야 하는 Azure 리소스의 정규화된 식별자입니다.

--subscription

구독의 이름 또는 ID입니다. 를 사용하여 기본 구독을 구성할 수 az account set -s NAME_OR_ID 있습니다.

--topic-type-name

이벤트 구독을 나열해야 하는 토픽 유형의 이름입니다. 이 매개 변수를 지정한 경우 --location도 지정해야 합니다.

az eventgrid event-subscription show

이벤트 구독의 세부 정보를 확인합니다.

az eventgrid event-subscription show --name
                                     [--include-attrib-secret {false, true}]
                                     [--include-full-endpoint-url {false, true}]
                                     [--query-examples]
                                     [--source-resource-id]
                                     [--subscription]

예제

Event Grid 토픽에 대한 이벤트 구독의 세부 정보를 표시합니다.

az eventgrid event-subscription show --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/topic1

Azure 구독에 대한 이벤트 구독의 세부 정보를 표시합니다.

az eventgrid event-subscription show --name es2 \
    --source-resource-id /subscriptions/{SubID}

리소스 그룹에 대한 이벤트 구독의 세부 정보를 표시합니다.

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1

스토리지 계정에 대한 이벤트 구독의 세부 정보를 표시합니다.

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/microsoft.storage/storageaccounts/kalsegblob

정적 배달 특성 비밀을 포함하여 리소스 그룹에 대한 이벤트 구독의 세부 정보를 표시합니다.

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 \
    --include-static-delivery-attribute-secret

필수 매개 변수

--name -n

이벤트 구독의 이름입니다.

선택적 매개 변수

--include-attrib-secret --include-static-delivery-attribute-secret

정적 배달 특성 비밀을 반환해야 하는지 여부를 나타냅니다. 플래그가 있으면 True입니다.

허용되는 값: false, true
--include-full-endpoint-url

전체 엔드포인트 URL을 반환할지 여부를 나타내려면 를 지정합니다. 플래그가 있으면 True입니다.

허용되는 값: false, true
--query-examples

JMESPath 문자열을 권장합니다. 쿼리 중 하나를 복사하여 큰따옴표 안에 --query 매개 변수를 붙여넣어 결과를 볼 수 있습니다. 이러한 키워드를 기반으로 제안을 제공할 수 있도록 하나 이상의 위치 키워드를 추가할 수 있습니다.

--source-resource-id

이벤트 구독을 표시해야 하는 Azure 리소스의 정규화된 식별자입니다.

--subscription

구독의 이름 또는 ID입니다. 를 사용하여 기본 구독을 구성할 수 az account set -s NAME_OR_ID 있습니다.

az eventgrid event-subscription update

이벤트 구독을 업데이트합니다.

az eventgrid event-subscription update --name
                                       [--add]
                                       [--advanced-filter]
                                       [--deadletter-endpoint]
                                       [--deadletter-identity {systemassigned}]
                                       [--deadletter-identity-endpoint]
                                       [--delivery-attribute-mapping]
                                       [--delivery-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--enable-advanced-filtering-on-arrays {false, true}]
                                       [--endpoint]
                                       [--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--force-string]
                                       [--included-event-types]
                                       [--labels]
                                       [--qttl]
                                       [--remove]
                                       [--set]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-ends-with]
                                       [--subscription]

예제

Event Grid 토픽에 대한 이벤트 구독을 업데이트하여 새 엔드포인트를 지정합니다.

az eventgrid event-subscription update --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

Azure 구독에 대한 이벤트 구독을 업데이트하여 새 제목 끝 필터를 지정합니다.

az eventgrid event-subscription update --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --subject-ends-with .jpg

리소스 그룹에 대한 이벤트 구독을 업데이트하여 새 엔드포인트 및 새 제목 끝 필터를 지정합니다.

az eventgrid event-subscription update --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --subject-ends-with .png \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

스토리지 계정에 대한 이벤트 구독을 업데이트하여 포함된 이벤트 유형의 새 목록을 지정합니다.

az eventgrid event-subscription update --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/microsoft.storage/storageaccounts/kalsegblob" \
    --included-event-types Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted

스토리지 계정에 대한 이벤트 구독을 업데이트하여 데드렛 대상을 포함합니다.

az eventgrid event-subscription update --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob" \
    --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/blobcontainer1

고급 필터를 사용하여 스토리지 계정에 대한 이벤트 구독을 업데이트합니다.

az eventgrid event-subscription update --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --advanced-filter data.blobType StringIn BlockBlob
    --advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net

5분으로 설정된 메시지 ttl을 포함하도록 스토리지 계정에 대한 이벤트 구독을 업데이트합니다.

az eventgrid event-subscription update --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob" \
    --storage-queue-msg-ttl 300

배열에서 고급 필터링을 사용하도록 설정된 이벤트 구독 업데이트

az eventgrid event-subscription update --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob" \
    --enable-advanced-filtering-on-arrays true

필수 매개 변수

--name -n

이벤트 구독의 이름입니다.

선택적 매개 변수

--add

경로 및 키 값 쌍을 지정하여 개체를 개체 목록에 추가합니다. 예: --add property.listProperty <key=value, string 또는 JSON string>.

--advanced-filter

고급 필터를 사용하면 특정 이벤트 속성을 기반으로 이벤트를 필터링할 수 있습니다.

--deadletter-endpoint

EventGrid가 이 이벤트 구독에 대해 배달할 수 없는 이벤트를 배달하지 않아야 하는 Azure Storage Blob 컨테이너 대상의 Azure 리소스 ID입니다.

--deadletter-identity

데드렛 대상 리소스의 ID 형식입니다.

허용되는 값: systemassigned
--deadletter-identity-endpoint

Id가 있는 Azure Storage Blob 컨테이너 대상의 Azure 리소스 ID입니다. 여기서 EventGrid는 이 이벤트 구독에 대해 배달할 수 없는 이벤트를 배달하지 않아야 합니다.

--delivery-attribute-mapping

이벤트를 배달할 때 HTTP 헤더를 통해 추가 정보를 보내도록 배달 특성 매핑을 추가합니다. 이 특성은 StorageQueue를 제외한 모든 대상 유형에 유효합니다. 두 개 이상의 인수를 사용하여 여러 특성을 지정할 수 --delivery-attribute-mapping 있습니다.

--delivery-identity

배달 대상 리소스의 ID 유형(예: 스토리지 큐 또는 eventhub)입니다.

허용되는 값: systemassigned
--delivery-identity-endpoint

EventGrid가 이 이벤트 구독과 일치하는 이벤트를 제공해야 하는 ID가 있는 엔드포인트입니다. 웹후크 엔드포인트 유형의 경우 해당 웹후크 URL이어야 합니다. 다른 엔드포인트 유형의 경우 엔드포인트의 Azure 리소스 식별자여야 합니다.

--delivery-identity-endpoint-type

리소스 ID가 있는 대상 엔드포인트의 형식입니다.

허용되는 값: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--enable-advanced-filtering-on-arrays --enable-af-arr

단수 값을 예상하는 대신 값 배열에 대해 고급 필터를 평가할 수 있습니다.

허용되는 값: false, true
--endpoint

EventGrid가 이 이벤트 구독과 일치하는 이벤트를 제공해야 하는 엔드포인트입니다. 웹후크 엔드포인트 유형의 경우 해당 웹후크 URL이어야 합니다. 다른 엔드포인트 유형의 경우 엔드포인트의 Azure 리소스 식별자여야 합니다. Event Grid 명령을 실행하기 전에 대상 엔드포인트를 이미 만들고 사용할 수 있어야 합니다.

--endpoint-type

대상 엔드포인트의 형식입니다.

허용되는 값: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
기본값: webhook
--force-string

'set' 또는 'add'를 사용하는 경우 JSON으로 변환하는 대신 문자열 리터럴을 유지합니다.

--included-event-types

공백으로 구분된 이벤트 유형 목록(예: Microsoft.Storage. BlobCreated 및 Microsoft. Storage. BlobDeleted). 모든 기본 이벤트 유형을 구독하려면 이 인수에 대한 값을 지정하지 마십시오. Event Grid 토픽의 경우 이벤트 유형은 고객이 정의합니다. Azure 이벤트(예: Storage 계정, IoT Hub 등)의 경우 이 CLI 명령 'az eventgrid topic-type list-event-types'를 사용하여 해당 이벤트 형식을 쿼리할 수 있습니다.

--labels

이 이벤트 구독과 연결할 공백으로 구분된 레이블 목록입니다.

--qttl --storage-queue-msg-ttl

큐 메시지 시간(초)을 Storage.

--remove

목록에서 속성 또는 요소를 제거합니다. 예: --remove property.list OR --remove propertyToRemove.

--set

설정할 속성 경로와 값을 지정하여 개체를 업데이트합니다. 예: --set property1.property2=.

--source-resource-id

이벤트 구독을 업데이트해야 하는 Azure 리소스의 정규화된 식별자입니다.

--subject-begins-with

접두사를 기반으로 이벤트 구독에 대한 이벤트를 필터링하는 선택적 문자열입니다. 와일드카드 문자는 지원되지 않습니다.

--subject-ends-with

접미사를 기준으로 이벤트 구독에 대한 이벤트를 필터링하는 선택적 문자열입니다. 와일드카드 문자는 지원되지 않습니다.

--subscription

구독의 이름 또는 ID입니다. 를 사용하여 기본 구독을 구성할 수 az account set -s NAME_OR_ID 있습니다.