Získejte odběr událostí.
Získání vlastností odběru událostí
GET https://management.azure.com/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}?api-version=2022-06-15
Parametry identifikátoru URI
Name |
V |
Vyžadováno |
Typ |
Description |
eventSubscriptionName
|
path |
True
|
string
|
Název odběru události.
|
scope
|
path |
True
|
string
|
Rozsah odběru událostí. Oborem může být předplatné, skupina prostředků, prostředek nejvyšší úrovně, který patří do oboru názvů poskytovatele prostředků, nebo téma EventGrid. Například pro předplatné použijte /subscriptions/{id_předplatného}/, /subscriptions/{id_předplatného}/resourceGroups/{název_skupiny_prostředků} pro skupinu prostředků. a /subscriptions/{id_předplatného}/resourceGroups/{název_skupiny_prostředků}/providers/{resourceProviderNamespace}/{resourceType}/{název_prostředku} pro prostředek a /subscriptions/{id_předplatného}/resourceGroups/{název_skupiny_prostředků}/providers/Microsoft.EventGrid/topics/{topicName} pro téma EventGrid.
|
api-version
|
query |
True
|
string
|
Verze rozhraní API, která se má použít s požadavkem klienta.
|
Odpovědi
Name |
Typ |
Description |
200 OK
|
EventSubscription
|
OK
|
Other Status Codes
|
|
Chybové odpovědi: ***
|
Příklady
EventSubscriptions_GetForCustomTopic
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopic(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopic() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.WebHookEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeWebHook),
// Properties: &armeventgrid.WebHookEventSubscriptionDestinationProperties{
// EndpointBaseURL: to.Ptr("https://requestb.in/15ksip71"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic.json
*/
async function eventSubscriptionsGetForCustomTopic() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"endpointBaseUrl": "https://requestb.in/15ksip71"
},
"endpointType": "WebHook"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForCustomTopic_AzureFunctionDestination
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic_azure_function_destination.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopicAzureFunctionDestination() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.AzureFunctionEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeAzureFunction),
// Properties: &armeventgrid.AzureFunctionEventSubscriptionDestinationProperties{
// ResourceID: to.Ptr("/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Web/sites/ContosoSite/funtions/ContosoFunc"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json
*/
async function eventSubscriptionsGetForCustomTopicAzureFunctionDestination() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"resourceId": "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Web/sites/ContosoSite/funtions/ContosoFunc"
},
"endpointType": "AzureFunction"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForCustomTopic_EventHubDestination
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic_EventHubDestination.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopicEventHubDestination(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic_event_hub_destination.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopicEventHubDestination() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.EventHubEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeEventHub),
// Properties: &armeventgrid.EventHubEventSubscriptionDestinationProperties{
// ResourceID: to.Ptr("/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json
*/
async function eventSubscriptionsGetForCustomTopicEventHubDestination() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"resourceId": "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"
},
"endpointType": "EventHub"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForCustomTopic_HybridConnectionDestination
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopicHybridConnectionDestination(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic_hybrid_connection_destination.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopicHybridConnectionDestination() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.HybridConnectionEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeHybridConnection),
// Properties: &armeventgrid.HybridConnectionEventSubscriptionDestinationProperties{
// ResourceID: to.Ptr("/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Relay/namespaces/ContosoNamespace/hybridConnections/HC1"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json
*/
async function eventSubscriptionsGetForCustomTopicHybridConnectionDestination() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"resourceId": "/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Relay/namespaces/ContosoNamespace/hybridConnections/HC1"
},
"endpointType": "HybridConnection"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopicServiceBusQueueDestination(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic_service_bus_queue_destination.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopicServiceBusQueueDestination() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.ServiceBusQueueEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeServiceBusQueue),
// Properties: &armeventgrid.ServiceBusQueueEventSubscriptionDestinationProperties{
// ResourceID: to.Ptr("/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ContosoNamespace/queues/SBQ"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json
*/
async function eventSubscriptionsGetForCustomTopicServiceBusQueueDestination() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"resourceId": "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ContosoNamespace/queues/SBQ"
},
"endpointType": "ServiceBusQueue"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic_service_bus_topic_destination.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopicServiceBusTopicDestination() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.ServiceBusTopicEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeServiceBusTopic),
// Properties: &armeventgrid.ServiceBusTopicEventSubscriptionDestinationProperties{
// ResourceID: to.Ptr("/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ContosoNamespace/topics/SBT"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json
*/
async function eventSubscriptionsGetForCustomTopicServiceBusTopicDestination() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"resourceId": "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ContosoNamespace/topics/SBT"
},
"endpointType": "ServiceBusTopic"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForCustomTopic_StorageQueueDestination
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic_StorageQueueDestination.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopicStorageQueueDestination(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic_storage_queue_destination.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopicStorageQueueDestination() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.StorageQueueEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeStorageQueue),
// Properties: &armeventgrid.StorageQueueEventSubscriptionDestinationProperties{
// QueueMessageTimeToLiveInSeconds: to.Ptr[int64](300),
// QueueName: to.Ptr("queue1"),
// ResourceID: to.Ptr("/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json
*/
async function eventSubscriptionsGetForCustomTopicStorageQueueDestination() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"resourceId": "/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg",
"queueName": "queue1",
"queueMessageTimeToLiveInSeconds": 300
},
"endpointType": "StorageQueue"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForCustomTopic_WebhookDestination
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json
*/
/**
* Sample code: EventSubscriptions_GetForCustomTopic_WebhookDestination.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForCustomTopicWebhookDestination(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_custom_topic_webhook_destination.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForCustomTopicWebhookDestination() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.WebHookEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeWebHook),
// Properties: &armeventgrid.WebHookEventSubscriptionDestinationProperties{
// EndpointBaseURL: to.Ptr("https://requestb.in/15ksip71"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json
*/
async function eventSubscriptionsGetForCustomTopicWebhookDestination() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"endpointBaseUrl": "https://requestb.in/15ksip71"
},
"endpointType": "WebHook"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.eventgrid/topics/exampletopic2"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForResource
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResource.json
*/
/**
* Sample code: EventSubscriptions_GetForResource.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1",
"examplesubscription1",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_resource.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1",
event_subscription_name="examplesubscription1",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResource.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResource.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForResource() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription1"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.EventHubEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeEventHub),
// Properties: &armeventgrid.EventHubEventSubscriptionDestinationProperties{
// ResourceID: to.Ptr("/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResource.json
*/
async function eventSubscriptionsGetForResource() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope =
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1";
const eventSubscriptionName = "examplesubscription1";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResource.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1";
string eventSubscriptionName = "examplesubscription1";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"resourceId": "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1"
},
"endpointType": "EventHub"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1",
"name": "examplesubscription1",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForResourceGroup
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResourceGroup.json
*/
/**
* Sample code: EventSubscriptions_GetForResourceGroup.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForResourceGroup(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg",
"examplesubscription2",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_resource_group.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg",
event_subscription_name="examplesubscription2",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResourceGroup.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResourceGroup.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForResourceGroup() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", "examplesubscription2", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription2"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.WebHookEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeWebHook),
// Properties: &armeventgrid.WebHookEventSubscriptionDestinationProperties{
// EndpointBaseURL: to.Ptr("https://requestb.in/15ksip71"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResourceGroup.json
*/
async function eventSubscriptionsGetForResourceGroup() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg";
const eventSubscriptionName = "examplesubscription2";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResourceGroup.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg";
string eventSubscriptionName = "examplesubscription2";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"endpointBaseUrl": "https://requestb.in/15ksip71"
},
"endpointType": "WebHook"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2",
"name": "examplesubscription2",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
EventSubscriptions_GetForSubscription
Ukázkový požadavek
GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3?api-version=2022-06-15
import com.azure.core.util.Context;
/** Samples for EventSubscriptions Get. */
public final class Main {
/*
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForSubscription.json
*/
/**
* Sample code: EventSubscriptions_GetForSubscription.
*
* @param manager Entry point to EventGridManager.
*/
public static void eventSubscriptionsGetForSubscription(
com.azure.resourcemanager.eventgrid.EventGridManager manager) {
manager
.eventSubscriptions()
.getWithResponse(
"subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.eventgrid import EventGridManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-eventgrid
# USAGE
python event_subscriptions_get_for_subscription.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EventGridManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.event_subscriptions.get(
scope="subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
event_subscription_name="examplesubscription3",
)
print(response)
# x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForSubscription.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeventgrid_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f88928d723133dc392e3297e6d61b7f6d10501fd/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForSubscription.json
func ExampleEventSubscriptionsClient_Get_eventSubscriptionsGetForSubscription() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeventgrid.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEventSubscriptionsClient().Get(ctx, "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.EventSubscription = armeventgrid.EventSubscription{
// Name: to.Ptr("examplesubscription3"),
// Type: to.Ptr("Microsoft.EventGrid/eventSubscriptions"),
// ID: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3"),
// Properties: &armeventgrid.EventSubscriptionProperties{
// Destination: &armeventgrid.WebHookEventSubscriptionDestination{
// EndpointType: to.Ptr(armeventgrid.EndpointTypeWebHook),
// Properties: &armeventgrid.WebHookEventSubscriptionDestinationProperties{
// EndpointBaseURL: to.Ptr("https://requestb.in/15ksip71"),
// },
// },
// Filter: &armeventgrid.EventSubscriptionFilter{
// IsSubjectCaseSensitive: to.Ptr(false),
// SubjectBeginsWith: to.Ptr("ExamplePrefix"),
// SubjectEndsWith: to.Ptr("ExampleSuffix"),
// },
// Labels: []*string{
// to.Ptr("label1"),
// to.Ptr("label2")},
// ProvisioningState: to.Ptr(armeventgrid.EventSubscriptionProvisioningStateSucceeded),
// Topic: to.Ptr("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EventGridManagementClient } = require("@azure/arm-eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get properties of an event subscription.
*
* @summary Get properties of an event subscription.
* x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForSubscription.json
*/
async function eventSubscriptionsGetForSubscription() {
const subscriptionId =
process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4";
const eventSubscriptionName = "examplesubscription3";
const credential = new DefaultAzureCredential();
const client = new EventGridManagementClient(credential, subscriptionId);
const result = await client.eventSubscriptions.get(scope, eventSubscriptionName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.EventGrid;
using Azure.ResourceManager.EventGrid.Models;
// Generated from example definition: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForSubscription.json
// this example is just showing the usage of "EventSubscriptions_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this EventSubscriptionResource created on azure
// for more information of creating EventSubscriptionResource, please refer to the document of EventSubscriptionResource
string scope = "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4";
string eventSubscriptionName = "examplesubscription3";
ResourceIdentifier eventSubscriptionResourceId = EventSubscriptionResource.CreateResourceIdentifier(scope, eventSubscriptionName);
EventSubscriptionResource eventSubscription = client.GetEventSubscriptionResource(eventSubscriptionResourceId);
// invoke the operation
EventSubscriptionResource result = await eventSubscription.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
EventGridSubscriptionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"properties": {
"destination": {
"properties": {
"endpointBaseUrl": "https://requestb.in/15ksip71"
},
"endpointType": "WebHook"
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": "ExamplePrefix",
"subjectEndsWith": "ExampleSuffix"
},
"labels": [
"label1",
"label2"
],
"provisioningState": "Succeeded",
"topic": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4"
},
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3",
"name": "examplesubscription3",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
Definice
AzureFunctionEventSubscriptionDestination
Informace o cíli funkce Azure pro odběr událostí
Name |
Typ |
Default value |
Description |
endpointType
|
string:
AzureFunction
|
|
Typ koncového bodu pro cíl odběru událostí.
|
properties.deliveryAttributeMappings
|
DeliveryAttributeMapping[]:
|
|
Podrobnosti o atributu doručení
|
properties.maxEventsPerBatch
|
integer
|
1
|
Maximální počet událostí na dávku
|
properties.preferredBatchSizeInKilobytes
|
integer
|
64
|
Upřednostňovaná velikost dávky v kilobajtech.
|
properties.resourceId
|
string
|
|
ID prostředku Azure, které představuje koncový bod cíle funkce Azure pro odběr událostí.
|
BoolEqualsAdvancedFilter
Rozšířený filtr BoolEquals.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
BoolEquals
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
value
|
boolean
|
Logická hodnota filtru.
|
createdByType
Typ identity, která vytvořila prostředek.
Name |
Typ |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
DeadLetterWithResourceIdentity
Informace o cíli deadletteru s identitou prostředku
Name |
Typ |
Description |
deadLetterDestination
|
DeadLetterDestination:
StorageBlobDeadLetterDestination
|
Informace o cíli, kam se mají doručovat události pro odběr události.
Používá nastavení spravované identity v nadřazených prostředcích (konkrétně téma nebo doména) k získání ověřovacích tokenů, které se používají při doručování nebo nedoručování.
|
identity
|
EventSubscriptionIdentity
|
Identita, která se má použít při nedoručených událostech.
|
DeliveryWithResourceIdentity
Informace o doručení odběru události s identitou prostředku
Name |
Typ |
Description |
destination
|
EventSubscriptionDestination:
|
Informace o cíli, kam se mají doručovat události pro odběr události.
Používá identitu Azure Event Grid k získání ověřovacích tokenů, které se používají při doručování nebo nedoručování.
|
identity
|
EventSubscriptionIdentity
|
Identita, která se má použít při doručování událostí.
|
DynamicDeliveryAttributeMapping
Podrobnosti mapování atributů dynamického doručení
Name |
Typ |
Description |
name
|
string
|
Název atributu doručení nebo hlavičky.
|
properties.sourceField
|
string
|
Cesta JSON v události, která obsahuje hodnotu atributu.
|
type
|
string:
Dynamic
|
Typ atributu doručení nebo názvu hlavičky.
|
EventDeliverySchema
Schéma doručování událostí pro odběr události.
Name |
Typ |
Description |
CloudEventSchemaV1_0
|
string
|
|
CustomInputSchema
|
string
|
|
EventGridSchema
|
string
|
|
EventHubEventSubscriptionDestination
Informace o cíli centra událostí pro odběr událostí
Name |
Typ |
Description |
endpointType
|
string:
EventHub
|
Typ koncového bodu pro cíl odběru událostí.
|
properties.deliveryAttributeMappings
|
DeliveryAttributeMapping[]:
|
Podrobnosti o atributu doručení
|
properties.resourceId
|
string
|
ID prostředku Azure, které představuje koncový bod cíle centra událostí odběru událostí.
|
EventSubscription
Odběr události
Name |
Typ |
Default value |
Description |
id
|
string
|
|
Plně kvalifikovaný identifikátor prostředku.
|
name
|
string
|
|
Název prostředku.
|
properties.deadLetterDestination
|
DeadLetterDestination:
StorageBlobDeadLetterDestination
|
|
Cíl nedoručených dopisů odběru událostí. Každá událost, kterou nelze doručit do cíle, je odeslána do cíle nedoručených dopisů.
Používá identitu Azure Event Grid k získání ověřovacích tokenů, které se používají při doručování nebo nedoručování.
|
properties.deadLetterWithResourceIdentity
|
DeadLetterWithResourceIdentity
|
|
Cíl nedoručených dopisů odběru událostí. Každá událost, kterou nelze doručit do cíle, je odeslána do cíle nedoručených dopisů.
Používá nastavení spravované identity v nadřazených prostředcích (konkrétně téma nebo doména) k získání ověřovacích tokenů, které se používají při doručování nebo nedoručování.
|
properties.deliveryWithResourceIdentity
|
DeliveryWithResourceIdentity
|
|
Informace o cíli, kam se mají doručovat události pro odběr události.
Používá nastavení spravované identity v nadřazených prostředcích (konkrétně téma nebo doména) k získání ověřovacích tokenů, které se používají při doručování nebo nedoručování.
|
properties.destination
|
EventSubscriptionDestination:
|
|
Informace o cíli, kam se mají doručovat události pro odběr události.
Používá identitu Azure Event Grid k získání ověřovacích tokenů, které se používají při doručování nebo nedoručování.
|
properties.eventDeliverySchema
|
EventDeliverySchema
|
EventGridSchema
|
Schéma doručování událostí pro odběr události.
|
properties.expirationTimeUtc
|
string
|
|
Čas vypršení platnosti odběru události.
|
properties.filter
|
EventSubscriptionFilter
|
|
Informace o filtru odběru událostí.
|
properties.labels
|
string[]
|
|
Seznam popisků definovaných uživatelem
|
properties.provisioningState
|
EventSubscriptionProvisioningState
|
|
Stav zřizování odběru události.
|
properties.retryPolicy
|
RetryPolicy
|
|
Zásady opakování pro události. Můžete ho použít ke konfiguraci maximálního počtu pokusů o doručení a doby trvání událostí.
|
properties.topic
|
string
|
|
Název tématu odběru události.
|
systemData
|
systemData
|
|
Systémová metadata související s prostředkem odběru událostí.
|
type
|
string
|
|
Typ prostředku.
|
EventSubscriptionFilter
Vyfiltrujte odběr události.
Name |
Typ |
Default value |
Description |
advancedFilters
|
AdvancedFilter[]:
|
|
Pole rozšířených filtrů, které se používají k filtrování odběrů událostí.
|
enableAdvancedFilteringOnArrays
|
boolean
|
|
Umožňuje vyhodnocovat rozšířené filtry s maticí hodnot místo toho, aby se očekávala hodnota singulárového čísla.
|
includedEventTypes
|
string[]
|
|
Seznam příslušných typů událostí, které musí být součástí odběru událostí. Pokud se chcete přihlásit k odběru všech výchozích typů událostí, nastavte IncludedEventTypes na hodnotu null.
|
isSubjectCaseSensitive
|
boolean
|
False
|
Určuje, jestli mají být vlastnosti SubjectBeginsWith a SubjectEndsWith filtru porovnány způsobem rozlišující malá a velká písmena.
|
subjectBeginsWith
|
string
|
|
Volitelný řetězec pro filtrování událostí odběru událostí na základě předpony cesty k prostředku.
Formát závisí na vydavateli událostí.
Tato cesta nepodporuje zástupné znaky.
|
subjectEndsWith
|
string
|
|
Volitelný řetězec pro filtrování událostí odběru událostí na základě přípony cesty k prostředku.
Tato cesta nepodporuje zástupné znaky.
|
EventSubscriptionIdentity
Informace o identitě s odběrem události.
Name |
Typ |
Description |
type
|
EventSubscriptionIdentityType
|
Typ použité spravované identity Typ SystemAssigned, UserAssigned zahrnuje implicitně vytvořenou identitu i sadu identit přiřazených uživatelem. Typ None odebere jakoukoli identitu.
|
userAssignedIdentity
|
string
|
Identita uživatele přidružená k prostředku.
|
EventSubscriptionIdentityType
Typ použité spravované identity. Typ SystemAssigned, UserAssigned zahrnuje implicitně vytvořenou identitu i sadu identit přiřazených uživatelem. Typ None odebere jakoukoli identitu.
Name |
Typ |
Description |
SystemAssigned
|
string
|
|
UserAssigned
|
string
|
|
EventSubscriptionProvisioningState
Stav zřizování odběru události.
Name |
Typ |
Description |
AwaitingManualAction
|
string
|
|
Canceled
|
string
|
|
Creating
|
string
|
|
Deleting
|
string
|
|
Failed
|
string
|
|
Succeeded
|
string
|
|
Updating
|
string
|
|
HybridConnectionEventSubscriptionDestination
Informace o cíli HybridConnection pro odběr událostí.
Name |
Typ |
Description |
endpointType
|
string:
HybridConnection
|
Typ koncového bodu pro cíl odběru událostí.
|
properties.deliveryAttributeMappings
|
DeliveryAttributeMapping[]:
|
Podrobnosti o atributu doručení
|
properties.resourceId
|
string
|
ID prostředku Azure hybridního připojení, které je cílem odběru událostí.
|
IsNotNullAdvancedFilter
Rozšířený filtr IsNotNull
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
IsNotNull
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
IsNullOrUndefinedAdvancedFilter
IsNullOrUndefined Rozšířený filtr.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
IsNullOrUndefined
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
NumberGreaterThanAdvancedFilter
Rozšířený filtr NumberGreaterThan.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberGreaterThan
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
value
|
number
|
Hodnota filtru.
|
NumberGreaterThanOrEqualsAdvancedFilter
Rozšířený filtr NumberGreaterThanOrEquals
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberGreaterThanOrEquals
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
value
|
number
|
Hodnota filtru.
|
NumberInAdvancedFilter
NumberV rozšířeném filtru.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberIn
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
number[]
|
Sada hodnot filtru.
|
NumberInRangeAdvancedFilter
Rozšířený filtr NumberInRange
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberInRange
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
number[]
|
Sada hodnot filtru.
|
NumberLessThanAdvancedFilter
NumberLessThan Rozšířený filtr.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberLessThan
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
value
|
number
|
Hodnota filtru.
|
NumberLessThanOrEqualsAdvancedFilter
Rozšířený filtr NumberLessThanOrEquals.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberLessThanOrEquals
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
value
|
number
|
Hodnota filtru.
|
NumberNotInAdvancedFilter
Rozšířený filtr NumberNotIn.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberNotIn
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
number[]
|
Sada hodnot filtru.
|
NumberNotInRangeAdvancedFilter
Rozšířený filtr NumberNotInRange.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
NumberNotInRange
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
number[]
|
Sada hodnot filtru.
|
RetryPolicy
Informace o zásadách opakování pro odběr událostí
Name |
Typ |
Default value |
Description |
eventTimeToLiveInMinutes
|
integer
|
1440
|
Funkce Time To Live (v minutách) pro události.
|
maxDeliveryAttempts
|
integer
|
30
|
Maximální počet opakovaných pokusů o doručení událostí
|
ServiceBusQueueEventSubscriptionDestination
Informace o cíli služby Service Bus pro odběr události.
Name |
Typ |
Description |
endpointType
|
string:
ServiceBusQueue
|
Typ koncového bodu pro cíl odběru událostí.
|
properties.deliveryAttributeMappings
|
DeliveryAttributeMapping[]:
|
Podrobnosti o atributu doručení
|
properties.resourceId
|
string
|
ID prostředku Azure, které představuje koncový bod cíle služby Service Bus odběru událostí.
|
ServiceBusTopicEventSubscriptionDestination
Informace o cíli tématu služby Service Bus pro odběr události
Name |
Typ |
Description |
endpointType
|
string:
ServiceBusTopic
|
Typ koncového bodu pro cíl odběru událostí.
|
properties.deliveryAttributeMappings
|
DeliveryAttributeMapping[]:
|
Podrobnosti o atributu doručení
|
properties.resourceId
|
string
|
ID prostředku Azure, které představuje koncový bod cíle tématu služby Service Bus odběru událostí.
|
StaticDeliveryAttributeMapping
Podrobnosti mapování statického atributu doručení
Name |
Typ |
Default value |
Description |
name
|
string
|
|
Název atributu doručení nebo hlavičky.
|
properties.isSecret
|
boolean
|
False
|
Logický příznak určující, jestli atribut obsahuje citlivé informace .
|
properties.value
|
string
|
|
Hodnota atributu delivery
|
type
|
string:
Static
|
|
Typ atributu doručení nebo názvu hlavičky.
|
StorageBlobDeadLetterDestination
Informace o cíli nedoručených dopisů založených na objektech blob úložiště
Name |
Typ |
Description |
endpointType
|
string:
StorageBlob
|
Typ koncového bodu pro cíl nedoručených dopisů
|
properties.blobContainerName
|
string
|
Název kontejneru objektů blob služby Storage, který je cílem událostí deadletter
|
properties.resourceId
|
string
|
ID prostředku Azure účtu úložiště, který je cílem událostí deadletter
|
StorageQueueEventSubscriptionDestination
Informace o cíli fronty úložiště pro odběr událostí
Name |
Typ |
Description |
endpointType
|
string:
StorageQueue
|
Typ koncového bodu pro cíl odběru událostí.
|
properties.queueMessageTimeToLiveInSeconds
|
integer
|
Doba, po kterou bude zpráva fronty úložiště aktivní v sekundách.
|
properties.queueName
|
string
|
Název fronty úložiště v účtu úložiště, který je cílem odběru událostí.
|
properties.resourceId
|
string
|
ID prostředku Azure účtu úložiště, který obsahuje frontu, která je cílem odběru událostí.
|
StringBeginsWithAdvancedFilter
StringBeginsWith Rozšířený filtr.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringBeginsWith
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
StringContainsAdvancedFilter
StringContains Advanced Filter.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringContains
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
StringEndsWithAdvancedFilter
StringEndsWith Rozšířený filtr.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringEndsWith
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
StringInAdvancedFilter
StringV rozšířeném filtru.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringIn
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
StringNotBeginsWithAdvancedFilter
StringNotBeginsWith Rozšířený filtr.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringNotBeginsWith
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
StringNotContainsAdvancedFilter
StringNotContains Advanced Filter.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringNotContains
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
StringNotEndsWithAdvancedFilter
StringNotEndsWith Rozšířený filtr.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringNotEndsWith
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
StringNotInAdvancedFilter
Rozšířený filtr StringNotIn.
Name |
Typ |
Description |
key
|
string
|
Pole nebo vlastnost v události, podle které chcete filtrovat.
|
operatorType
|
string:
StringNotIn
|
Typ operátoru použitého pro filtrování, např. NumberIn, StringContains, BoolEquals a další.
|
values
|
string[]
|
Sada hodnot filtru.
|
systemData
Metadata týkající se vytvoření a poslední změny prostředku
Name |
Typ |
Description |
createdAt
|
string
|
Časové razítko vytvoření prostředku (UTC)
|
createdBy
|
string
|
Identita, která prostředek vytvořila.
|
createdByType
|
createdByType
|
Typ identity, která vytvořila prostředek.
|
lastModifiedAt
|
string
|
Časové razítko poslední změny prostředku (UTC)
|
lastModifiedBy
|
string
|
Identita, která naposledy změnila prostředek.
|
lastModifiedByType
|
createdByType
|
Typ identity, která naposledy změnila prostředek.
|
WebHookEventSubscriptionDestination
Informace o cíli webhooku pro odběr události
Name |
Typ |
Default value |
Description |
endpointType
|
string:
WebHook
|
|
Typ koncového bodu pro cíl odběru událostí.
|
properties.azureActiveDirectoryApplicationIdOrUri
|
string
|
|
ID nebo identifikátor URI aplikace Azure Active Directory pro získání přístupového tokenu, který bude zahrnut jako nosný token v žádostech o doručení.
|
properties.azureActiveDirectoryTenantId
|
string
|
|
ID tenanta Azure Active Directory pro získání přístupového tokenu, který bude zahrnut jako nosný token v žádostech o doručení.
|
properties.deliveryAttributeMappings
|
DeliveryAttributeMapping[]:
|
|
Podrobnosti o atributu doručení
|
properties.endpointBaseUrl
|
string
|
|
Základní adresa URL, která představuje koncový bod cíle odběru událostí.
|
properties.endpointUrl
|
string
|
|
Adresa URL, která představuje koncový bod cíle odběru událostí.
|
properties.maxEventsPerBatch
|
integer
|
1
|
Maximální počet událostí na dávku
|
properties.preferredBatchSizeInKilobytes
|
integer
|
64
|
Upřednostňovaná velikost dávky v kilobajtech.
|