Skip to main content

namespaces

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

Overview

Namenamespaces
TypeResource
Idazure.event_grid.namespaces

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.
identityobjectIdentity information for the Namespace resource.
inboundIpRulesarrayThis can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
isZoneRedundantbooleanThis is an optional property and it allows the user to specify if the namespace resource supports zone-redundancy capability or not. If this property is not specified explicitly by the user, its default value depends on the following conditions: a. For Availability Zones enabled regions - The default property value would be true. b. For non-Availability Zones enabled regions - The default property value would be false. Once specified, this property cannot be updated.
locationstringThe geo-location where the resource lives. Required.
minimumTlsVersionAllowedstringMinimum TLS version of the publisher allowed to publish to this namespace. Only TLS version 1.2 is supported. Known values are: "1.0", "1.1", and "1.2". (1.0, 1.1, 1.2)
privateEndpointConnectionsarrayList of private endpoint connections.
provisioningStatestringProvisioning state of the namespace resource. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed", "Deleted", "DeleteFailed", "CreateFailed", and "UpdatedFailed". (Creating, Updating, Deleting, Succeeded, Canceled, Failed, Deleted, DeleteFailed, CreateFailed, UpdatedFailed)
publicNetworkAccessstringThis determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring . Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". (Enabled, Disabled, SecuredByPerimeter)
skuobjectRepresents available Sku pricing tiers.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
topicSpacesConfigurationobjectTopic spaces configuration information for the namespace resource.
topicsConfigurationobjectTopics configuration information for the namespace resource.
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, namespace_name, subscription_idGet a namespace. Get properties of a namespace.
list_by_resource_groupselectresource_group_name, subscription_id$filter, $topList namespaces under a resource group. List all the namespaces under a resource group.
list_by_subscriptionselectsubscription_id$filter, $topList namespaces under an Azure subscription. List all the namespaces under an Azure subscription.
create_or_updateinsertresource_group_name, namespace_name, subscription_id, locationCreate or update a namespace. Asynchronously creates or updates a new namespace with the specified parameters.
updateupdateresource_group_name, namespace_name, subscription_idUpdate a namespace. Asynchronously updates a namespace with the specified parameters.
create_or_updatereplaceresource_group_name, namespace_name, subscription_id, locationCreate or update a namespace. Asynchronously creates or updates a new namespace with the specified parameters.
deletedeleteresource_group_name, namespace_name, subscription_idDelete a namespace. Delete existing namespace.
list_shared_access_keysexecresource_group_name, namespace_name, subscription_idList keys for a namespace. List the two keys used to publish to a namespace.
regenerate_keyexecresource_group_name, namespace_name, subscription_id, keyNameRegenerate key for a namespace. Regenerate a shared access key for a namespace.
validate_custom_domain_ownershipexecresource_group_name, namespace_name, subscription_idValidate ownership for all custom domains in a namespace. Performs ownership validation via checking TXT records for all custom domains in a namespace.

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
namespace_namestringName of the namespace. 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 namespace. Get properties of a namespace.

SELECT
id,
name,
identity,
inboundIpRules,
isZoneRedundant,
location,
minimumTlsVersionAllowed,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
sku,
systemData,
tags,
topicSpacesConfiguration,
topicsConfiguration,
type
FROM azure.event_grid.namespaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a namespace. Asynchronously creates or updates a new namespace with the specified parameters.

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

UPDATE examples

Update a namespace. Asynchronously updates a namespace with the specified parameters.

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

REPLACE examples

Create or update a namespace. Asynchronously creates or updates a new namespace with the specified parameters.

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

DELETE examples

Delete a namespace. Delete existing namespace.

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

Lifecycle Methods

List keys for a namespace. List the two keys used to publish to a namespace.

EXEC azure.event_grid.namespaces.list_shared_access_keys 
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;