[Automation] Collect examples from azure-sdk-for-js#@azure/arm-servicebus_6.2.0-beta.1

Co-authored-by: azure-sdk <azuresdk@microsoft.com>
This commit is contained in:
Azure-Fluent 2023-02-22 08:03:58 +08:00 коммит произвёл GitHub
Родитель bd83debd49
Коммит c671893727
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
136 изменённых файлов: 1750 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,23 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration is in-progress.
*
* @summary This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration is in-progress.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationCompleteMigration.json
*/
async function migrationConfigurationsCompleteMigration() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "SubscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-41";
const configName = "$default";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.migrationConfigs.completeMigration(
resourceGroupName,
namespaceName,
configName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,29 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates Migration configuration and starts migration of entities from Standard to Premium namespace
*
* @summary Creates Migration configuration and starts migration of entities from Standard to Premium namespace
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationCreateAndStartMigration.json
*/
async function migrationConfigurationsStartMigration() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "SubscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-41";
const configName = "$default";
const parameters = {
postMigrationName: "sdk-PostMigration-5919",
targetNamespace:
"/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028",
};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.migrationConfigs.beginCreateAndStartMigrationAndWait(
resourceGroupName,
namespaceName,
configName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,19 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a MigrationConfiguration
*
* @summary Deletes a MigrationConfiguration
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationDelete.json
*/
async function migrationConfigurationsDelete() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "SubscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-41";
const configName = "$default";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.migrationConfigs.delete(resourceGroupName, namespaceName, configName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,19 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Retrieves Migration Config
*
* @summary Retrieves Migration Config
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationGet.json
*/
async function migrationConfigurationsGet() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "SubscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-41";
const configName = "$default";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.migrationConfigs.get(resourceGroupName, namespaceName, configName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets all migrationConfigurations
*
* @summary Gets all migrationConfigurations
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationList.json
*/
async function migrationConfigurationsList() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "SubscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-9259";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.migrationConfigs.list(resourceGroupName, namespaceName)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,19 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to This operation reverts Migration
*
* @summary This operation reverts Migration
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Migrationconfigurations/SBMigrationconfigurationRevert.json
*/
async function migrationConfigurationsRevert() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "SubscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-41";
const configName = "$default";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.migrationConfigs.revert(resourceGroupName, namespaceName, configName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates PrivateEndpointConnections of service namespace.
*
* @summary Creates or updates PrivateEndpointConnections of service namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionCreate.json
*/
async function nameSpacePrivateEndPointConnectionCreate() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subID";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-2924";
const privateEndpointConnectionName = "privateEndpointConnectionName";
const parameters = {
privateEndpoint: {
id: "/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-8396/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-2847",
},
privateLinkServiceConnectionState: {
description: "testing",
status: "Rejected",
},
provisioningState: "Succeeded",
};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.privateEndpointConnections.createOrUpdate(
resourceGroupName,
namespaceName,
privateEndpointConnectionName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,24 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes an existing Private Endpoint Connection.
*
* @summary Deletes an existing Private Endpoint Connection.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionDelete.json
*/
async function nameSpacePrivateEndPointConnectionDelete() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-3285";
const privateEndpointConnectionName = "928c44d5-b7c6-423b-b6fa-811e0c27b3e0";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.privateEndpointConnections.beginDeleteAndWait(
resourceGroupName,
namespaceName,
privateEndpointConnectionName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,23 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets a description for the specified Private Endpoint Connection.
*
* @summary Gets a description for the specified Private Endpoint Connection.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionGet.json
*/
async function nameSpacePrivateEndPointConnectionGet() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subID";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "SDK-ServiceBus-4794";
const namespaceName = "sdk-Namespace-5828";
const privateEndpointConnectionName = "privateEndpointConnectionName";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.privateEndpointConnections.get(
resourceGroupName,
namespaceName,
privateEndpointConnectionName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the available PrivateEndpointConnections within a namespace.
*
* @summary Gets the available PrivateEndpointConnections within a namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateEndPointConnectionList.json
*/
async function nameSpaceCreate() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subID";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "SDK-ServiceBus-4794";
const namespaceName = "sdk-Namespace-5828";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.privateEndpointConnections.list(resourceGroupName, namespaceName)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,18 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets lists of resources that supports Privatelinks.
*
* @summary Gets lists of resources that supports Privatelinks.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/PrivateLinkResourcesGet.json
*/
async function nameSpacePrivateLinkResourcesGet() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subID";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-2924";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.privateLinkResources.get(resourceGroupName, namespaceName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates an authorization rule for a namespace.
*
* @summary Creates or updates an authorization rule for a namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleCreate.json
*/
async function nameSpaceAuthorizationRuleCreate() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-6914";
const authorizationRuleName = "sdk-AuthRules-1788";
const parameters = { rights: ["Listen", "Send"] };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.createOrUpdateAuthorizationRule(
resourceGroupName,
namespaceName,
authorizationRuleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,24 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a namespace authorization rule.
*
* @summary Deletes a namespace authorization rule.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleDelete.json
*/
async function nameSpaceAuthorizationRuleDelete() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-namespace-6914";
const authorizationRuleName = "sdk-AuthRules-1788";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.deleteAuthorizationRule(
resourceGroupName,
namespaceName,
authorizationRuleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,24 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets an authorization rule for a namespace by rule name.
*
* @summary Gets an authorization rule for a namespace by rule name.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleGet.json
*/
async function nameSpaceAuthorizationRuleGet() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-6914";
const authorizationRuleName = "sdk-AuthRules-1788";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.getAuthorizationRule(
resourceGroupName,
namespaceName,
authorizationRuleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,25 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the authorization rules for a namespace.
*
* @summary Gets the authorization rules for a namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleListAll.json
*/
async function nameSpaceAuthorizationRuleListAll() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-6914";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.namespaces.listAuthorizationRules(
resourceGroupName,
namespaceName
)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,24 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the primary and secondary connection strings for the namespace.
*
* @summary Gets the primary and secondary connection strings for the namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleListKey.json
*/
async function nameSpaceAuthorizationRuleListKey() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-namespace-6914";
const authorizationRuleName = "sdk-AuthRules-1788";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.listKeys(
resourceGroupName,
namespaceName,
authorizationRuleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Regenerates the primary or secondary connection strings for the namespace.
*
* @summary Regenerates the primary or secondary connection strings for the namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceAuthorizationRuleRegenerateKey.json
*/
async function nameSpaceAuthorizationRuleRegenerateKey() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-namespace-6914";
const authorizationRuleName = "sdk-AuthRules-1788";
const parameters = { keyType: "PrimaryKey" };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.regenerateKeys(
resourceGroupName,
namespaceName,
authorizationRuleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,18 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Check the give namespace name availability.
*
* @summary Check the give namespace name availability.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceCheckNameAvailability.json
*/
async function nameSpaceCheckNameAvailability() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const parameters = { name: "sdk-Namespace-2924" };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.checkNameAvailability(parameters);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,29 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @summary Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceCreate.json
*/
async function nameSpaceCreate() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace2924";
const parameters = {
location: "South Central US",
premiumMessagingPartitions: 2,
sku: { name: "Premium", capacity: 4, tier: "Premium" },
tags: { tag1: "value1", tag2: "value2" },
};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.beginCreateOrUpdateAndWait(
resourceGroupName,
namespaceName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,19 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes an existing namespace. This operation also removes all associated resources under the namespace.
*
* @summary Deletes an existing namespace. This operation also removes all associated resources under the namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceDelete.json
*/
async function nameSpaceDelete() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-3285";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.beginDeleteAndWait(resourceGroupName, namespaceName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,19 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets a description for the specified namespace.
*
* @summary Gets a description for the specified namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceGet.json
*/
async function nameSpaceGet() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-2924";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.get(resourceGroupName, namespaceName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,20 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets all the available namespaces within the subscription, irrespective of the resource groups.
*
* @summary Gets all the available namespaces within the subscription, irrespective of the resource groups.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceList.json
*/
async function nameSpaceList() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.namespaces.list()) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the available namespaces within a resource group.
*
* @summary Gets the available namespaces within a resource group.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceListByResourceGroup.json
*/
async function nameSpaceListByResourceGroup() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.namespaces.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,23 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @summary Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/SBNameSpaceUpdate.json
*/
async function nameSpaceUpdate() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-3285";
const parameters = {
location: "South Central US",
tags: { tag3: "value3", tag4: "value4" },
};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.update(resourceGroupName, namespaceName, parameters);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,52 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Create or update NetworkRuleSet for a Namespace.
*
* @summary Create or update NetworkRuleSet for a Namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetCreate.json
*/
async function nameSpaceNetworkRuleSetCreate() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "Subscription";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-6019";
const parameters = {
defaultAction: "Deny",
ipRules: [
{ action: "Allow", ipMask: "1.1.1.1" },
{ action: "Allow", ipMask: "1.1.1.2" },
{ action: "Allow", ipMask: "1.1.1.3" },
{ action: "Allow", ipMask: "1.1.1.4" },
{ action: "Allow", ipMask: "1.1.1.5" },
],
virtualNetworkRules: [
{
ignoreMissingVnetServiceEndpoint: true,
subnet: {
id: "/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2",
},
},
{
ignoreMissingVnetServiceEndpoint: false,
subnet: {
id: "/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3",
},
},
{
ignoreMissingVnetServiceEndpoint: false,
subnet: {
id: "/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6",
},
},
],
};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.createOrUpdateNetworkRuleSet(
resourceGroupName,
namespaceName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,18 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets NetworkRuleSet for a Namespace.
*
* @summary Gets NetworkRuleSet for a Namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetGet.json
*/
async function nameSpaceNetworkRuleSetGet() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "Subscription";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-6019";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.namespaces.getNetworkRuleSet(resourceGroupName, namespaceName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets list of NetworkRuleSet for a Namespace.
*
* @summary Gets list of NetworkRuleSet for a Namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/NameSpaces/VirtualNetworkRule/SBNetworkRuleSetList.json
*/
async function nameSpaceNetworkRuleSetList() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "Subscription";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-6019";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.namespaces.listNetworkRuleSets(resourceGroupName, namespaceName)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,28 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates an authorization rule for a queue.
*
* @summary Creates an authorization rule for a queue.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleCreate.json
*/
async function queueAuthorizationRuleCreate() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-7982";
const queueName = "sdk-Queues-2317";
const authorizationRuleName = "sdk-AuthRules-5800";
const parameters = { rights: ["Listen", "Send"] };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.createOrUpdateAuthorizationRule(
resourceGroupName,
namespaceName,
queueName,
authorizationRuleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a queue authorization rule.
*
* @summary Deletes a queue authorization rule.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleDelete.json
*/
async function queueAuthorizationRuleDelete() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-namespace-7982";
const queueName = "sdk-Queues-2317";
const authorizationRuleName = "sdk-AuthRules-5800";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.deleteAuthorizationRule(
resourceGroupName,
namespaceName,
queueName,
authorizationRuleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets an authorization rule for a queue by rule name.
*
* @summary Gets an authorization rule for a queue by rule name.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleGet.json
*/
async function queueAuthorizationRuleGet() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-7982";
const queueName = "sdk-Queues-2317";
const authorizationRuleName = "sdk-AuthRules-5800";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.getAuthorizationRule(
resourceGroupName,
namespaceName,
queueName,
authorizationRuleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,27 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets all authorization rules for a queue.
*
* @summary Gets all authorization rules for a queue.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleListAll.json
*/
async function queueAuthorizationRuleListAll() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-7982";
const queueName = "sdk-Queues-2317";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.queues.listAuthorizationRules(
resourceGroupName,
namespaceName,
queueName
)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Primary and secondary connection strings to the queue.
*
* @summary Primary and secondary connection strings to the queue.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleListKey.json
*/
async function queueAuthorizationRuleListKey() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-namespace-7982";
const queueName = "sdk-Queues-2317";
const authorizationRuleName = "sdk-AuthRules-5800";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.listKeys(
resourceGroupName,
namespaceName,
queueName,
authorizationRuleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,28 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Regenerates the primary or secondary connection strings to the queue.
*
* @summary Regenerates the primary or secondary connection strings to the queue.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueAuthorizationRuleRegenerateKey.json
*/
async function queueAuthorizationRuleRegenerateKey() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-namespace-7982";
const queueName = "sdk-Queues-2317";
const authorizationRuleName = "sdk-AuthRules-5800";
const parameters = { keyType: "PrimaryKey" };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.regenerateKeys(
resourceGroupName,
namespaceName,
queueName,
authorizationRuleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a Service Bus queue. This operation is idempotent.
*
* @summary Creates or updates a Service Bus queue. This operation is idempotent.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueCreate.json
*/
async function queueCreate() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-3174";
const queueName = "sdk-Queues-5647";
const parameters = { enablePartitioning: true };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.createOrUpdate(
resourceGroupName,
namespaceName,
queueName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,20 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a queue from the specified namespace in a resource group.
*
* @summary Deletes a queue from the specified namespace in a resource group.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueDelete.json
*/
async function queueDelete() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-183";
const queueName = "sdk-Queues-8708";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.delete(resourceGroupName, namespaceName, queueName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,20 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Returns a description for the specified queue.
*
* @summary Returns a description for the specified queue.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueGet.json
*/
async function queueGet() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-3174";
const queueName = "sdk-Queues-5647";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.queues.get(resourceGroupName, namespaceName, queueName);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,22 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the queues within a namespace.
*
* @summary Gets the queues within a namespace.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Queues/SBQueueListByNameSpace.json
*/
async function queueListByNameSpace() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-3174";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.queues.listByNamespace(resourceGroupName, namespaceName)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,29 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new rule and updates an existing rule
*
* @summary Creates a new rule and updates an existing rule
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleCreate.json
*/
async function rulesCreateOrUpdate() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "resourceGroupName";
const namespaceName = "sdk-Namespace-1319";
const topicName = "sdk-Topics-2081";
const subscriptionName = "sdk-Subscriptions-8691";
const ruleName = "sdk-Rules-6571";
const parameters = {};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.rules.createOrUpdate(
resourceGroupName,
namespaceName,
topicName,
subscriptionName,
ruleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,32 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new rule and updates an existing rule
*
* @summary Creates a new rule and updates an existing rule
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleCreate_CorrelationFilter.json
*/
async function rulesCreateCorrelationFilter() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "resourceGroupName";
const namespaceName = "sdk-Namespace-1319";
const topicName = "sdk-Topics-2081";
const subscriptionName = "sdk-Subscriptions-8691";
const ruleName = "sdk-Rules-6571";
const parameters = {
correlationFilter: { properties: { topicHint: "Crop" } },
filterType: "CorrelationFilter",
};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.rules.createOrUpdate(
resourceGroupName,
namespaceName,
topicName,
subscriptionName,
ruleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,32 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new rule and updates an existing rule
*
* @summary Creates a new rule and updates an existing rule
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleCreate_SqlFilter.json
*/
async function rulesCreateSqlFilter() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "resourceGroupName";
const namespaceName = "sdk-Namespace-1319";
const topicName = "sdk-Topics-2081";
const subscriptionName = "sdk-Subscriptions-8691";
const ruleName = "sdk-Rules-6571";
const parameters = {
filterType: "SqlFilter",
sqlFilter: { sqlExpression: "myproperty=test" },
};
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.rules.createOrUpdate(
resourceGroupName,
namespaceName,
topicName,
subscriptionName,
ruleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,28 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes an existing rule.
*
* @summary Deletes an existing rule.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleDelete.json
*/
async function rulesDelete() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-1319";
const topicName = "sdk-Topics-2081";
const subscriptionName = "sdk-Subscriptions-8691";
const ruleName = "sdk-Rules-6571";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.rules.delete(
resourceGroupName,
namespaceName,
topicName,
subscriptionName,
ruleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,28 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Retrieves the description for the specified rule.
*
* @summary Retrieves the description for the specified rule.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleGet.json
*/
async function rulesGet() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-1319";
const topicName = "sdk-Topics-2081";
const subscriptionName = "sdk-Subscriptions-8691";
const ruleName = "sdk-Rules-6571";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.rules.get(
resourceGroupName,
namespaceName,
topicName,
subscriptionName,
ruleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,29 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all the rules within given topic-subscription
*
* @summary List all the rules within given topic-subscription
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Rules/RuleListBySubscription.json
*/
async function rulesListBySubscriptions() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-1319";
const topicName = "sdk-Topics-2081";
const subscriptionName = "sdk-Subscriptions-8691";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.rules.listBySubscriptions(
resourceGroupName,
namespaceName,
topicName,
subscriptionName
)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,20 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists all of the available ServiceBus REST API operations.
*
* @summary Lists all of the available ServiceBus REST API operations.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/SBOperations_List.json
*/
async function operationsList() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,27 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a topic subscription.
*
* @summary Creates a topic subscription.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionCreate.json
*/
async function subscriptionCreate() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "Subscriptionid";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-1349";
const topicName = "sdk-Topics-8740";
const subscriptionName = "sdk-Subscriptions-2178";
const parameters = { enableBatchedOperations: true };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.subscriptions.createOrUpdate(
resourceGroupName,
namespaceName,
topicName,
subscriptionName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,25 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a subscription from the specified topic.
*
* @summary Deletes a subscription from the specified topic.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionDelete.json
*/
async function subscriptionDelete() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "subscriptionId";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-5882";
const topicName = "sdk-Topics-1804";
const subscriptionName = "sdk-Subscriptions-3670";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.subscriptions.delete(
resourceGroupName,
namespaceName,
topicName,
subscriptionName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,25 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Returns a subscription description for the specified topic.
*
* @summary Returns a subscription description for the specified topic.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionGet.json
*/
async function subscriptionGet() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "Subscriptionid";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-1349";
const topicName = "sdk-Topics-8740";
const subscriptionName = "sdk-Subscriptions-2178";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.subscriptions.get(
resourceGroupName,
namespaceName,
topicName,
subscriptionName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all the subscriptions under a specified topic.
*
* @summary List all the subscriptions under a specified topic.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Subscriptions/SBSubscriptionListByTopic.json
*/
async function subscriptionListByTopic() {
const subscriptionId = process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5{Subscriptionid}";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ResourceGroup";
const namespaceName = "sdk-Namespace-1349";
const topicName = "sdk-Topics-8740";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.subscriptions.listByTopic(
resourceGroupName,
namespaceName,
topicName
)) {
resArray.push(item);
}
console.log(resArray);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,28 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates an authorization rule for the specified topic.
*
* @summary Creates an authorization rule for the specified topic.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleCreate.json
*/
async function topicAuthorizationRuleCreate() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-6261";
const topicName = "sdk-Topics-1984";
const authorizationRuleName = "sdk-AuthRules-4310";
const parameters = { rights: ["Listen", "Send"] };
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.topics.createOrUpdateAuthorizationRule(
resourceGroupName,
namespaceName,
topicName,
authorizationRuleName,
parameters
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Просмотреть файл

@ -0,0 +1,26 @@
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a topic authorization rule.
*
* @summary Deletes a topic authorization rule.
* x-ms-original-file: specification/servicebus/resource-manager/Microsoft.ServiceBus/preview/2022-10-01-preview/examples/Topics/SBTopicAuthorizationRuleDelete.json
*/
async function topicAuthorizationRuleDelete() {
const subscriptionId =
process.env["SERVICEBUS_SUBSCRIPTION_ID"] || "5f750a97-50d9-4e36-8081-c9ee4c0210d4";
const resourceGroupName = process.env["SERVICEBUS_RESOURCE_GROUP"] || "ArunMonocle";
const namespaceName = "sdk-Namespace-6261";
const topicName = "sdk-Topics-1984";
const authorizationRuleName = "sdk-AuthRules-4310";
const credential = new DefaultAzureCredential();
const client = new ServiceBusManagementClient(credential, subscriptionId);
const result = await client.topics.deleteAuthorizationRule(
resourceGroupName,
namespaceName,
topicName,
authorizationRuleName
);
console.log(result);
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-js/blob/%40azure%2Farm-servicebus_6.2.0-beta.1/sdk/servicebus/arm-servicebus/README.md"}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше