Skip to main content

partner_topics

Creates, updates, deletes, gets or lists a partner_topics resource.

Overview

Namepartner_topics
TypeResource
Idazure.event_grid.partner_topics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
activationStatestringActivation state of the partner topic. Known values are: "NeverActivated", "Activated", and "Deactivated". (NeverActivated, Activated, Deactivated)
eventTypeInfoobjectEvent Type information from the corresponding event channel.
expirationTimeIfNotActivatedUtcstring (date-time)Expiration time of the partner topic. If this timer expires while the partner topic is still never activated, the partner topic and corresponding event channel are deleted.
identityobjectIdentity information for the Partner Topic resource.
locationstringThe geo-location where the resource lives. Required.
messageForActivationstringContext or helpful message that can be used during the approval process by the subscriber.
partnerRegistrationImmutableIdstringThe immutableId of the corresponding partner registration.
partnerTopicFriendlyDescriptionstringFriendly description about the topic. This can be set by the publisher/partner to show custom description for the customer partner topic. This will be helpful to remove any ambiguity of the origin of creation of the partner topic for the customer.
provisioningStatestringProvisioning state of the partner topic. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed", and "IdleDueToMirroredChannelResourceDeletion". (Creating, Updating, Deleting, Succeeded, Canceled, Failed, IdleDueToMirroredChannelResourceDeletion)
sourcestringSource associated with this partner topic. This represents a unique partner resource.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, partner_topic_name, subscription_idGet a partner topic. Get properties of a partner topic.
list_by_resource_groupselectresource_group_name, subscription_id$filter, $topList partner topics under a resource group. List all the partner topics under a resource group.
list_by_subscriptionselectsubscription_id$filter, $topList partner topics under an Azure subscription. List all the partner topics under an Azure subscription.
create_or_updateinsertresource_group_name, partner_topic_name, subscription_id, locationCreate a partner topic. Asynchronously creates a new partner topic with the specified parameters.
updateupdateresource_group_name, partner_topic_name, subscription_idUpdate a partner topic. Asynchronously updates a partner topic with the specified parameters.
create_or_updatereplaceresource_group_name, partner_topic_name, subscription_id, locationCreate a partner topic. Asynchronously creates a new partner topic with the specified parameters.
deletedeleteresource_group_name, partner_topic_name, subscription_idDelete a partner topic. Delete existing partner topic.
activateexecresource_group_name, partner_topic_name, subscription_idActivate a partner topic. Activate a newly created partner topic.
deactivateexecresource_group_name, partner_topic_name, subscription_idDeactivate a partner topic. Deactivate specific partner topic.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
partner_topic_namestringName of the partner topic. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringThe query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. Default value is None.
$topintegerThe number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. Default value is None.

SELECT examples

Get a partner topic. Get properties of a partner topic.

SELECT
id,
name,
activationState,
eventTypeInfo,
expirationTimeIfNotActivatedUtc,
identity,
location,
messageForActivation,
partnerRegistrationImmutableId,
partnerTopicFriendlyDescription,
provisioningState,
source,
systemData,
tags,
type
FROM azure.event_grid.partner_topics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND partner_topic_name = '{{ partner_topic_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a partner topic. Asynchronously creates a new partner topic with the specified parameters.

INSERT INTO azure.event_grid.partner_topics (
tags,
location,
properties,
identity,
resource_group_name,
partner_topic_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ partner_topic_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update a partner topic. Asynchronously updates a partner topic with the specified parameters.

UPDATE azure.event_grid.partner_topics
SET
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND partner_topic_name = '{{ partner_topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create a partner topic. Asynchronously creates a new partner topic with the specified parameters.

REPLACE azure.event_grid.partner_topics
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND partner_topic_name = '{{ partner_topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete a partner topic. Delete existing partner topic.

DELETE FROM azure.event_grid.partner_topics
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND partner_topic_name = '{{ partner_topic_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Activate a partner topic. Activate a newly created partner topic.

EXEC azure.event_grid.partner_topics.activate 
@resource_group_name='{{ resource_group_name }}' --required,
@partner_topic_name='{{ partner_topic_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;