Share via


az eventgrid event-subscription

참고 항목

이 명령 그룹에는 Azure CLI 및 하나 이상의 확장 모두에 정의된 명령이 있습니다. 확장된 기능을 활용하려면 각 확장을 설치합니다. 확장 프로그램에 대해 자세히 알아보세요.

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

Event Grid 토픽, do기본, do기본 토픽, Azure 구독, 리소스 그룹 또는 이벤트 알림을 지원하는 다른 Azure 리소스에 대한 이벤트 구독을 관리합니다.

명령

Name Description 형식 상태
az eventgrid event-subscription create

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

핵심 GA
az eventgrid event-subscription create (eventgrid 확장)

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

내선 번호 프리뷰
az eventgrid event-subscription delete

이벤트 구독을 삭제합니다.

핵심 GA
az eventgrid event-subscription delete (eventgrid 확장)

이벤트 구독을 삭제합니다.

내선 번호 프리뷰
az eventgrid event-subscription list

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

핵심 GA
az eventgrid event-subscription list (eventgrid 확장)

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

내선 번호 프리뷰
az eventgrid event-subscription show

이벤트 구독의 세부 정보를 가져옵니다.

핵심 GA
az eventgrid event-subscription show (eventgrid 확장)

이벤트 구독의 세부 정보를 가져옵니다.

내선 번호 프리뷰
az eventgrid event-subscription update

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

핵심 GA
az eventgrid event-subscription update (eventgrid 확장)

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

내선 번호 프리뷰

az eventgrid event-subscription create

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

az eventgrid event-subscription create --name
                                       [--aad-tenant-id]
                                       [--advanced-filter]
                                       [--azure-active-directory-application-id-or-uri]
                                       [--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]
                                       [--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]

예제

기본 필터를 사용하여 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 do기본에 대한 새 이벤트 구독을 만듭니다.

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회 배달 시도의 사용자 지정 재시도 정책 및 이벤트 TTL이 2시간(이전에 발생)인 스토리지 계정에 대한 새 이벤트 구독을 만듭니다.

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

do기본 토픽에 대한 새 이벤트 구독을 만듭니다.

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 사용 웹후크를 대상으로 사용하여 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가 있는 Eventhub를 대상으로 사용하고 MSI ID가 있는 데드렛을 사용하여 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을 사용하여 스토리지 큐를 대상으로 사용하여 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

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

선택적 매개 변수

--aad-tenant-id --azure-active-directory-tenant-id

배달 요청에 전달자 토큰으로 포함될 액세스 토큰을 가져오는 Azure Active Directory 테넌트 ID입니다. 웹후크를 대상으로 하는 경우에만 적용됩니다.

--advanced-filter

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

사용: --advanced-filter KEY[. INNERKEY] FILTEROPERATOR 값 [VALUE ...] StringIn: --advanced-filter 데이터. Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter data. Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringNotContains: --advanced-filter subject StringNotContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringNotBeginsWith : --advanced-filter subject StringNotBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg StringNotEndsWith: --advanced-filter subject StringNotEndsWith img png jpg NumberIn: --advanced-filter data.property1 NumberIn 5 10 20 NumberInRange --advanced-filter data.property1 NumberInRange 5,10 20,30 40,50 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberNotInRange: --advanced-filter data.property2 NumberNotInRangee 100,110 200,210 300,310 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 Bool true IsNullOrUndefined: --advanced-filter data.property3 IsNullOrUndefined IsNotNull: --advanced-filter data.property3 IsNotNull 다중 고급 필터는 둘 --advanced-filter 이상의 인수를 사용하여 지정할 수 있습니다.

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

배달 요청에 전달자 토큰으로 포함될 액세스 토큰을 가져오는 Azure Active Directory 애플리케이션 ID 또는 URI입니다. 웹후크를 대상으로 하는 경우에만 적용됩니다.

--deadletter-endpoint

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

예: --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/containerName.

--deadletter-identity
미리 보기

배달 못 한 대상 리소스의 ID 형식입니다.

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

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

--delivery-attribute-mapping

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

사용법: --delivery-attribute-mapping attribute-name attribute-type attribute-value [attribute-is-secret] Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue Static Attribute Mapping: --delivery-attribute -mapping somename static somevalue false Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue true Dynamic Attribute Mapping: --delivery-attribute-mapping somename dynamic somevalue Static and Dynamic: -- delivery-attribute-mapping somename dynamic somevalue --delivery-attribute-mapping somename2 static somevalue.

--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

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

기본값: webhook
--event-delivery-schema

이 이벤트 구독에 대해 이벤트를 배달해야 하는 스키마입니다. 기본적으로 이벤트는 게시되는 것과 동일한 스키마로 전달됩니다(해당 토픽의 입력 스키마에 따라).

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

이벤트 라이브 시간(분)입니다. 1에서 1440 사이의 숫자여야 합니다.

기본값: 1440
--expiration-date

이벤트 구독이 만료되는 날짜 또는 날짜/시간(예: '2018-11-30T11:59:59+00:00' 또는 '2018-11-30')입니다. 기본적으로 이벤트 구독에 대한 만료는 없습니다.

--included-event-types

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

--labels

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

--max-delivery-attempts

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

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

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

--preferred-batch-size-in-kilobytes

기본 배치 크기(킬로바이트)입니다. 1에서 1024 사이의 숫자여야 합니다.

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

스토리지 큐 메시지 시간(초)입니다.

--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

--subject-begins-with

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

--subject-case-sensitive

주체 필드를 대/소문자를 구분하여 비교할지 여부를 지정합니다. 플래그가 있으면 True입니다.

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

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

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription create (eventgrid 확장)

미리 보기

명령 그룹 'az eventgrid'는 미리 보기로 개발 중입니다. 참조 및 지원 수준: https://aka.ms/CLI_refstatus

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

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-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--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]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-case-sensitive {false, true}]
                                       [--subject-ends-with]

예제

기본 필터를 사용하여 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 do기본에 대한 새 이벤트 구독을 만듭니다.

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회 배달 시도의 사용자 지정 재시도 정책 및 이벤트 TTL이 2시간(이전에 발생)인 스토리지 계정에 대한 새 이벤트 구독을 만듭니다.

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

do기본 토픽에 대한 새 이벤트 구독을 만듭니다.

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 사용 웹후크를 대상으로 사용하여 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가 있는 Eventhub를 대상으로 사용하고 MSI ID가 있는 데드렛을 사용하여 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}

필수 매개 변수

--name -n

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

선택적 매개 변수

--advanced-filter

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

사용: --advanced-filter KEY[. INNERKEY] FILTEROPERATOR 값 [VALUE ...] StringIn: --advanced-filter 데이터. Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter data. Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg NumberIn: --advanced-filter data. property1 NumberIn 5 10 20 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 BoolEquals true 다중 고급 필터는 둘 --advanced-filter 이상의 인수를 사용하여 지정할 수 있습니다.

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

배달 요청에 전달자 토큰으로 포함될 액세스 토큰을 가져오는 Azure Active Directory 애플리케이션 ID 또는 URI입니다. 웹후크를 대상으로 하는 경우에만 적용됩니다.

--azure-active-directory-tenant-id

배달 요청에 전달자 토큰으로 포함될 액세스 토큰을 가져오는 Azure Active Directory 테넌트 ID입니다. 웹후크를 대상으로 하는 경우에만 적용됩니다.

--deadletter-endpoint

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

예: --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/containerName.

--deadletter-identity

배달 못 한 대상 리소스의 ID 형식입니다.

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

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

--delivery-identity

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

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

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

--delivery-identity-endpoint-type

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

허용되는 값: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--endpoint

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

--endpoint-type

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

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

이 이벤트 구독에 대해 이벤트를 배달해야 하는 스키마입니다. 기본적으로 이벤트는 게시되는 것과 동일한 스키마로 전달됩니다(해당 토픽의 입력 스키마에 따라).

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

이벤트 라이브 시간(분)입니다. 1에서 1440 사이의 숫자여야 합니다.

기본값: 1440
--expiration-date

이벤트 구독이 만료되는 날짜 또는 날짜/시간(예: '2018-11-30T11:59:59+00:00' 또는 '2018-11-30')입니다. 기본적으로 이벤트 구독에 대한 만료는 없습니다.

--included-event-types

공백으로 구분된 이벤트 형식 목록입니다. 예: Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted. 모든 기본 이벤트 형식을 구독하려면 이 인수에 대한 값을 지정하지 마세요.

--labels

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

--max-delivery-attempts

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

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

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

--preferred-batch-size-in-kilobytes

기본 배치 크기(킬로바이트)입니다. 1에서 1024 사이의 숫자여야 합니다.

--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

--subject-begins-with

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

--subject-case-sensitive

주체 필드를 대/소문자를 구분하여 비교할지 여부를 지정합니다. 플래그가 있으면 True입니다.

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

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

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription delete

이벤트 구독을 삭제합니다.

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

예제

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

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

Event Grid do기본 토픽에 대한 이벤트 구독을 삭제합니다.

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 리소스의 정규화된 식별자입니다.

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription delete (eventgrid 확장)

미리 보기

명령 그룹 'az eventgrid'는 미리 보기로 개발 중입니다. 참조 및 지원 수준: https://aka.ms/CLI_refstatus

이벤트 구독을 삭제합니다.

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

예제

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

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

Event Grid do기본 토픽에 대한 이벤트 구독을 삭제합니다.

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 리소스의 정규화된 식별자입니다.

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription list

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

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

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

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

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

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, OR 및 NOT이 포함됩니다.

--resource-group -g

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

--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

--topic-type-name

이벤트 구독을 나열해야 하는 토픽 형식의 이름입니다. 이 옵션을 지정하면 --location도 지정해야 합니다.

예제 1: WestUS2 --resource-group TestRG --topic-type-name Microsoft.Storage.StorageAccounts --location westus2 예제 2: Azure 구독의 모든 이벤트 구독 나열 --topic-type-name Microsoft.Resources.Subscriptions --location global의 모든 Storage 이벤트 구독을 나열합니다.

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription list (eventgrid 확장)

미리 보기

명령 그룹 'az eventgrid'는 미리 보기로 개발 중입니다. 참조 및 지원 수준: https://aka.ms/CLI_refstatus

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

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

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

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

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

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 구문을 사용하여 결과를 필터링하는 데 사용되는 쿼리입니다.

--resource-group -g

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

--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

--topic-type-name

이벤트 구독을 나열해야 하는 토픽 형식의 이름입니다. 이 옵션을 지정하면 --location도 지정해야 합니다.

예제 1: WestUS2 --resource-group TestRG --topic-type-name Microsoft.Storage.StorageAccounts --location westus2 예제 2: Azure 구독의 모든 이벤트 구독 나열 --topic-type-name Microsoft.Resources.Subscriptions --location global의 모든 Storage 이벤트 구독을 나열합니다.

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription show

이벤트 구독의 세부 정보를 가져옵니다.

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

예제

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
기본값: False
--include-full-endpoint-url

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

허용되는 값: false, true
기본값: False
--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription show (eventgrid 확장)

미리 보기

명령 그룹 'az eventgrid'는 미리 보기로 개발 중입니다. 참조 및 지원 수준: https://aka.ms/CLI_refstatus

이벤트 구독의 세부 정보를 가져옵니다.

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

예제

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

필수 매개 변수

--name -n

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

선택적 매개 변수

--include-full-endpoint-url

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

허용되는 값: false, true
기본값: False
--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

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]
                                       [--force-string]
                                       [--included-event-types]
                                       [--labels]
                                       [--qttl]
                                       [--remove]
                                       [--set]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-ends-with]

예제

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 or JSON string>

기본값: []
--advanced-filter

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

사용: --advanced-filter KEY[. INNERKEY] FILTEROPERATOR 값 [VALUE ...] StringIn: --advanced-filter 데이터. Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter data. Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringNotContains: --advanced-filter subject StringNotContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringNotBeginsWith : --advanced-filter subject StringNotBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg StringNotEndsWith: --advanced-filter subject StringNotEndsWith img png jpg NumberIn: --advanced-filter data.property1 NumberIn 5 10 20 NumberInRange --advanced-filter data.property1 NumberInRange 5,10 20,30 40,50 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberNotInRange: --advanced-filter data.property2 NumberNotInRangee 100,110 200,210 300,310 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 Bool true IsNullOrUndefined: --advanced-filter data.property3 IsNullOrUndefined IsNotNull: --advanced-filter data.property3 IsNotNull 다중 고급 필터는 둘 --advanced-filter 이상의 인수를 사용하여 지정할 수 있습니다.

--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-attribute-mapping attribute-name attribute-type attribute-value [attribute-is-secret] Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue Static Attribute Mapping: --delivery-attribute -mapping somename static somevalue false Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue true Dynamic Attribute Mapping: --delivery-attribute-mapping somename dynamic somevalue Static and Dynamic: -- delivery-attribute-mapping somename dynamic somevalue --delivery-attribute-mapping somename2 static somevalue.

--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

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

기본값: webhook
--force-string

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

기본값: False
--included-event-types

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

--labels

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

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

스토리지 큐 메시지 시간(초)입니다.

--remove

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

기본값: []
--set

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

기본값: []
--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

--subject-begins-with

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

--subject-ends-with

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

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.

az eventgrid event-subscription update (eventgrid 확장)

미리 보기

명령 그룹 'az eventgrid'는 미리 보기로 개발 중입니다. 참조 및 지원 수준: https://aka.ms/CLI_refstatus

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

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

예제

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

필수 매개 변수

--name -n

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

선택적 매개 변수

--add

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

기본값: []
--advanced-filter

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

사용: --advanced-filter KEY[. INNERKEY] FILTEROPERATOR 값 [VALUE ...] StringIn: --advanced-filter 데이터. Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter data. Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg NumberIn: --advanced-filter data. property1 NumberIn 5 10 20 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 BoolEquals true 다중 고급 필터는 둘 --advanced-filter 이상의 인수를 사용하여 지정할 수 있습니다.

--deadletter-endpoint

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

--deadletter-identity

배달 못 한 대상 리소스의 ID 형식입니다.

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

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

--delivery-identity

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

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

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

--delivery-identity-endpoint-type

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

허용되는 값: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--endpoint

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

--endpoint-type

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

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

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

기본값: False
--included-event-types

공백으로 구분된 이벤트 형식 목록입니다. 예: Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted. 모든 기본 이벤트 형식을 구독하려면 이 인수에 대한 값을 지정하지 마세요.

--labels

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

--remove

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

기본값: []
--set

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

기본값: []
--source-resource-id

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

사용: --source-resource-id Azure-Resource-ID For Azure 구독: --source-resource-id /subscriptions/{SubID} 리소스 그룹: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 EventGrid 토픽: --source-resource-id /subscriptions/{SubID }/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 스토리지 계정: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid do기본: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1 For EventGrid do기본 항목: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/do기본s/d1/topics/t1.

--subject-begins-with

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

--subject-ends-with

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

전역 매개 변수
--debug

로깅의 자세한 정도를 늘려 모든 디버그 로그를 표시합니다.

--help -h

이 도움말 메시지를 표시하고 종료합니다.

--only-show-errors

경고를 표시하지 않고 오류만 표시합니다.

--output -o

출력 형식입니다.

허용되는 값: json, jsonc, none, table, tsv, yaml, yamlc
기본값: json
--query

JMESPath 쿼리 문자열입니다. 자세한 내용과 예제는 http://jmespath.org/를 참조하세요.

--subscription

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

--verbose

로깅의 자세한 정도를 늘립니다. 전체 디버그 로그를 표시하려면 --debug를 사용합니다.