[Automation] Collect examples from azure-sdk-for-go#sdk/resourcemanager/servicebus/armservicebus/v1.0.0
Co-authored-by: azure-sdk <azuresdk@microsoft.com>
This commit is contained in:
Родитель
1f34f79eba
Коммит
bcfe6ee586
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleMigrationConfigsClient_CompleteMigration() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewMigrationConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewMigrationConfigsClient("SubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.CompleteMigration(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-41",
|
||||
armservicebus.MigrationConfigurationNameDefault,
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -7,8 +7,6 @@ import (
|
|||
"context"
|
||||
"log"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
|
||||
|
@ -19,33 +17,29 @@ func ExampleMigrationConfigsClient_BeginCreateAndStartMigration() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewMigrationConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewMigrationConfigsClient("SubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginCreateAndStartMigration(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-41",
|
||||
armservicebus.MigrationConfigurationNameDefault,
|
||||
armservicebus.MigrationConfigProperties{
|
||||
Properties: &armservicebus.MigrationConfigPropertiesProperties{
|
||||
PostMigrationName: to.Ptr("<post-migration-name>"),
|
||||
TargetNamespace: to.Ptr("<target-namespace>"),
|
||||
PostMigrationName: to.Ptr("sdk-PostMigration-5919"),
|
||||
TargetNamespace: to.Ptr("/subscriptions/SubscriptionId/resourceGroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-4028"),
|
||||
},
|
||||
},
|
||||
&armservicebus.MigrationConfigsClientBeginCreateAndStartMigrationOptions{ResumeToken: ""})
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := poller.PollUntilDone(ctx, 30*time.Second)
|
||||
res, err := poller.PollUntilDone(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to pull the result: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleMigrationConfigsClient_Delete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewMigrationConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewMigrationConfigsClient("SubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Delete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-41",
|
||||
armservicebus.MigrationConfigurationNameDefault,
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleMigrationConfigsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewMigrationConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewMigrationConfigsClient("SubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-41",
|
||||
armservicebus.MigrationConfigurationNameDefault,
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleMigrationConfigsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewMigrationConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewMigrationConfigsClient("SubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
pager := client.NewListPager("ResourceGroup",
|
||||
"sdk-Namespace-9259",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleMigrationConfigsClient_Revert() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewMigrationConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewMigrationConfigsClient("SubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Revert(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-41",
|
||||
armservicebus.MigrationConfigurationNameDefault,
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,25 +17,23 @@ func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("subID", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<private-endpoint-connection-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-2924",
|
||||
"privateEndpointConnectionName",
|
||||
armservicebus.PrivateEndpointConnection{
|
||||
Properties: &armservicebus.PrivateEndpointConnectionProperties{
|
||||
PrivateEndpoint: &armservicebus.PrivateEndpoint{
|
||||
ID: to.Ptr("<id>"),
|
||||
ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-ServiceBus-8396/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-2847"),
|
||||
},
|
||||
PrivateLinkServiceConnectionState: &armservicebus.ConnectionState{
|
||||
Description: to.Ptr("<description>"),
|
||||
Description: to.Ptr("testing"),
|
||||
Status: to.Ptr(armservicebus.PrivateLinkConnectionStatusRejected),
|
||||
},
|
||||
ProvisioningState: to.Ptr(armservicebus.EndPointProvisioningStateSucceeded),
|
||||
|
@ -44,7 +42,6 @@ func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -7,8 +7,6 @@ import (
|
|||
"context"
|
||||
"log"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
|
||||
)
|
||||
|
@ -18,27 +16,23 @@ func ExamplePrivateEndpointConnectionsClient_BeginDelete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginDelete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<private-endpoint-connection-name>",
|
||||
&armservicebus.PrivateEndpointConnectionsClientBeginDeleteOptions{ResumeToken: ""})
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-3285",
|
||||
"928c44d5-b7c6-423b-b6fa-811e0c27b3e0",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = poller.PollUntilDone(ctx, 30*time.Second)
|
||||
_, err = poller.PollUntilDone(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to pull the result: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExamplePrivateEndpointConnectionsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("subID", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<private-endpoint-connection-name>",
|
||||
"SDK-ServiceBus-4794",
|
||||
"sdk-Namespace-5828",
|
||||
"privateEndpointConnectionName",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExamplePrivateEndpointConnectionsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewPrivateEndpointConnectionsClient("subID", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
pager := client.NewListPager("SDK-ServiceBus-4794",
|
||||
"sdk-Namespace-5828",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,21 +16,18 @@ func ExamplePrivateLinkResourcesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewPrivateLinkResourcesClient("subID", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-2924",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,18 +17,16 @@ func ExampleNamespacesClient_CreateOrUpdateAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdateAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-6914",
|
||||
"sdk-AuthRules-1788",
|
||||
armservicebus.SBAuthorizationRule{
|
||||
Properties: &armservicebus.SBAuthorizationRuleProperties{
|
||||
Rights: []*armservicebus.AccessRights{
|
||||
|
@ -39,7 +37,6 @@ func ExampleNamespacesClient_CreateOrUpdateAuthorizationRule() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleNamespacesClient_DeleteAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.DeleteAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-namespace-6914",
|
||||
"sdk-AuthRules-1788",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleNamespacesClient_GetAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-6914",
|
||||
"sdk-AuthRules-1788",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleNamespacesClient_NewListAuthorizationRulesPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListAuthorizationRulesPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
pager := client.NewListAuthorizationRulesPager("ArunMonocle",
|
||||
"sdk-Namespace-6914",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleNamespacesClient_ListKeys() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.ListKeys(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-namespace-6914",
|
||||
"sdk-AuthRules-1788",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,25 +17,22 @@ func ExampleNamespacesClient_RegenerateKeys() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.RegenerateKeys(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-namespace-6914",
|
||||
"sdk-AuthRules-1788",
|
||||
armservicebus.RegenerateAccessKeyParameters{
|
||||
KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey),
|
||||
},
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,22 +17,19 @@ func ExampleNamespacesClient_CheckNameAvailability() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CheckNameAvailability(ctx,
|
||||
armservicebus.CheckNameAvailability{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("sdk-Namespace-2924"),
|
||||
},
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -7,8 +7,6 @@ import (
|
|||
"context"
|
||||
"log"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
|
||||
|
@ -19,19 +17,17 @@ func ExampleNamespacesClient_BeginCreateOrUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginCreateOrUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace2924",
|
||||
armservicebus.SBNamespace{
|
||||
Location: to.Ptr("<location>"),
|
||||
Location: to.Ptr("South Central US"),
|
||||
Tags: map[string]*string{
|
||||
"tag1": to.Ptr("value1"),
|
||||
"tag2": to.Ptr("value2"),
|
||||
|
@ -41,15 +37,13 @@ func ExampleNamespacesClient_BeginCreateOrUpdate() {
|
|||
Tier: to.Ptr(armservicebus.SKUTierStandard),
|
||||
},
|
||||
},
|
||||
&armservicebus.NamespacesClientBeginCreateOrUpdateOptions{ResumeToken: ""})
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := poller.PollUntilDone(ctx, 30*time.Second)
|
||||
res, err := poller.PollUntilDone(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to pull the result: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -7,8 +7,6 @@ import (
|
|||
"context"
|
||||
"log"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus"
|
||||
)
|
||||
|
@ -18,26 +16,22 @@ func ExampleNamespacesClient_BeginDelete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginDelete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
&armservicebus.NamespacesClientBeginDeleteOptions{ResumeToken: ""})
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-3285",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = poller.PollUntilDone(ctx, 30*time.Second)
|
||||
_, err = poller.PollUntilDone(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to pull the result: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,21 +16,18 @@ func ExampleNamespacesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-2924",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,20 +16,17 @@ func ExampleNamespacesClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager(nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,21 +16,18 @@ func ExampleNamespacesClient_NewListByResourceGroupPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListByResourceGroupPager("<resource-group-name>",
|
||||
pager := client.NewListByResourceGroupPager("ArunMonocle",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,19 +17,17 @@ func ExampleNamespacesClient_Update() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Update(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-3285",
|
||||
armservicebus.SBNamespaceUpdateParameters{
|
||||
Location: to.Ptr("<location>"),
|
||||
Location: to.Ptr("South Central US"),
|
||||
Tags: map[string]*string{
|
||||
"tag3": to.Ptr("value3"),
|
||||
"tag4": to.Ptr("value4"),
|
||||
|
@ -38,7 +36,6 @@ func ExampleNamespacesClient_Update() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,58 +17,56 @@ func ExampleNamespacesClient_CreateOrUpdateNetworkRuleSet() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("Subscription", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdateNetworkRuleSet(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-6019",
|
||||
armservicebus.NetworkRuleSet{
|
||||
Properties: &armservicebus.NetworkRuleSetProperties{
|
||||
DefaultAction: to.Ptr(armservicebus.DefaultActionDeny),
|
||||
IPRules: []*armservicebus.NWRuleSetIPRules{
|
||||
{
|
||||
Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
|
||||
IPMask: to.Ptr("<ipmask>"),
|
||||
IPMask: to.Ptr("1.1.1.1"),
|
||||
},
|
||||
{
|
||||
Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
|
||||
IPMask: to.Ptr("<ipmask>"),
|
||||
IPMask: to.Ptr("1.1.1.2"),
|
||||
},
|
||||
{
|
||||
Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
|
||||
IPMask: to.Ptr("<ipmask>"),
|
||||
IPMask: to.Ptr("1.1.1.3"),
|
||||
},
|
||||
{
|
||||
Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
|
||||
IPMask: to.Ptr("<ipmask>"),
|
||||
IPMask: to.Ptr("1.1.1.4"),
|
||||
},
|
||||
{
|
||||
Action: to.Ptr(armservicebus.NetworkRuleIPActionAllow),
|
||||
IPMask: to.Ptr("<ipmask>"),
|
||||
IPMask: to.Ptr("1.1.1.5"),
|
||||
}},
|
||||
VirtualNetworkRules: []*armservicebus.NWRuleSetVirtualNetworkRules{
|
||||
{
|
||||
IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
|
||||
Subnet: &armservicebus.Subnet{
|
||||
ID: to.Ptr("<id>"),
|
||||
ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
|
||||
},
|
||||
},
|
||||
{
|
||||
IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
|
||||
Subnet: &armservicebus.Subnet{
|
||||
ID: to.Ptr("<id>"),
|
||||
ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
|
||||
},
|
||||
},
|
||||
{
|
||||
IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
|
||||
Subnet: &armservicebus.Subnet{
|
||||
ID: to.Ptr("<id>"),
|
||||
ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourcegroups/alitest/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
|
||||
},
|
||||
}},
|
||||
},
|
||||
|
@ -76,7 +74,6 @@ func ExampleNamespacesClient_CreateOrUpdateNetworkRuleSet() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,21 +16,18 @@ func ExampleNamespacesClient_GetNetworkRuleSet() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("Subscription", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetNetworkRuleSet(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-6019",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleNamespacesClient_NewListNetworkRuleSetsPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewNamespacesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewNamespacesClient("Subscription", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListNetworkRuleSetsPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
pager := client.NewListNetworkRuleSetsPager("ResourceGroup",
|
||||
"sdk-Namespace-6019",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,19 +17,17 @@ func ExampleQueuesClient_CreateOrUpdateAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdateAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-7982",
|
||||
"sdk-Queues-2317",
|
||||
"sdk-AuthRules-5800",
|
||||
armservicebus.SBAuthorizationRule{
|
||||
Properties: &armservicebus.SBAuthorizationRuleProperties{
|
||||
Rights: []*armservicebus.AccessRights{
|
||||
|
@ -40,7 +38,6 @@ func ExampleQueuesClient_CreateOrUpdateAuthorizationRule() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleQueuesClient_DeleteAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.DeleteAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-namespace-7982",
|
||||
"sdk-Queues-2317",
|
||||
"sdk-AuthRules-5800",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleQueuesClient_GetAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-7982",
|
||||
"sdk-Queues-2317",
|
||||
"sdk-AuthRules-5800",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleQueuesClient_NewListAuthorizationRulesPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListAuthorizationRulesPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
pager := client.NewListAuthorizationRulesPager("ArunMonocle",
|
||||
"sdk-Namespace-7982",
|
||||
"sdk-Queues-2317",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleQueuesClient_ListKeys() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.ListKeys(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-namespace-7982",
|
||||
"sdk-Queues-2317",
|
||||
"sdk-AuthRules-5800",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,26 +17,23 @@ func ExampleQueuesClient_RegenerateKeys() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.RegenerateKeys(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-namespace-7982",
|
||||
"sdk-Queues-2317",
|
||||
"sdk-AuthRules-5800",
|
||||
armservicebus.RegenerateAccessKeyParameters{
|
||||
KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey),
|
||||
},
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,18 +17,16 @@ func ExampleQueuesClient_CreateOrUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-3174",
|
||||
"sdk-Queues-5647",
|
||||
armservicebus.SBQueue{
|
||||
Properties: &armservicebus.SBQueueProperties{
|
||||
EnablePartitioning: to.Ptr(true),
|
||||
|
@ -37,7 +35,6 @@ func ExampleQueuesClient_CreateOrUpdate() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleQueuesClient_Delete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Delete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-183",
|
||||
"sdk-Queues-8708",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleQueuesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<queue-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-3174",
|
||||
"sdk-Queues-5647",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,16 +16,14 @@ func ExampleQueuesClient_NewListByNamespacePager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewQueuesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewQueuesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListByNamespacePager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
pager := client.NewListByNamespacePager("ArunMonocle",
|
||||
"sdk-Namespace-3174",
|
||||
&armservicebus.QueuesClientListByNamespaceOptions{Skip: nil,
|
||||
Top: nil,
|
||||
})
|
||||
|
@ -33,7 +31,6 @@ func ExampleQueuesClient_NewListByNamespacePager() {
|
|||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,20 +17,18 @@ func ExampleRulesClient_CreateOrUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewRulesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewRulesClient("subscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<subscription-name>",
|
||||
"<rule-name>",
|
||||
"resourceGroupName",
|
||||
"sdk-Namespace-1319",
|
||||
"sdk-Topics-2081",
|
||||
"sdk-Subscriptions-8691",
|
||||
"sdk-Rules-6571",
|
||||
armservicebus.Rule{
|
||||
Properties: &armservicebus.Ruleproperties{
|
||||
CorrelationFilter: &armservicebus.CorrelationFilter{
|
||||
|
@ -44,7 +42,6 @@ func ExampleRulesClient_CreateOrUpdate() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,24 +16,21 @@ func ExampleRulesClient_Delete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewRulesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewRulesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Delete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<subscription-name>",
|
||||
"<rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-1319",
|
||||
"sdk-Topics-2081",
|
||||
"sdk-Subscriptions-8691",
|
||||
"sdk-Rules-6571",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,24 +16,21 @@ func ExampleRulesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewRulesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewRulesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<subscription-name>",
|
||||
"<rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-1319",
|
||||
"sdk-Topics-2081",
|
||||
"sdk-Subscriptions-8691",
|
||||
"sdk-Rules-6571",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,18 +16,16 @@ func ExampleRulesClient_NewListBySubscriptionsPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewRulesClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewRulesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListBySubscriptionsPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<subscription-name>",
|
||||
pager := client.NewListBySubscriptionsPager("ArunMonocle",
|
||||
"sdk-Namespace-1319",
|
||||
"sdk-Topics-2081",
|
||||
"sdk-Subscriptions-8691",
|
||||
&armservicebus.RulesClientListBySubscriptionsOptions{Skip: nil,
|
||||
Top: nil,
|
||||
})
|
||||
|
@ -35,7 +33,6 @@ func ExampleRulesClient_NewListBySubscriptionsPager() {
|
|||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,20 +16,17 @@ func ExampleOperationsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewOperationsClient(cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager(nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,19 +17,17 @@ func ExampleSubscriptionsClient_CreateOrUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewSubscriptionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewSubscriptionsClient("Subscriptionid", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<subscription-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-1349",
|
||||
"sdk-Topics-8740",
|
||||
"sdk-Subscriptions-2178",
|
||||
armservicebus.SBSubscription{
|
||||
Properties: &armservicebus.SBSubscriptionProperties{
|
||||
EnableBatchedOperations: to.Ptr(true),
|
||||
|
@ -38,7 +36,6 @@ func ExampleSubscriptionsClient_CreateOrUpdate() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleSubscriptionsClient_Delete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewSubscriptionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewSubscriptionsClient("subscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Delete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<subscription-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-5882",
|
||||
"sdk-Topics-1804",
|
||||
"sdk-Subscriptions-3670",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleSubscriptionsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewSubscriptionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewSubscriptionsClient("Subscriptionid", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<subscription-name>",
|
||||
"ResourceGroup",
|
||||
"sdk-Namespace-1349",
|
||||
"sdk-Topics-8740",
|
||||
"sdk-Subscriptions-2178",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,17 +16,15 @@ func ExampleSubscriptionsClient_NewListByTopicPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewSubscriptionsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewSubscriptionsClient("5{Subscriptionid}", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListByTopicPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
pager := client.NewListByTopicPager("ResourceGroup",
|
||||
"sdk-Namespace-1349",
|
||||
"sdk-Topics-8740",
|
||||
&armservicebus.SubscriptionsClientListByTopicOptions{Skip: nil,
|
||||
Top: nil,
|
||||
})
|
||||
|
@ -34,7 +32,6 @@ func ExampleSubscriptionsClient_NewListByTopicPager() {
|
|||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,19 +17,17 @@ func ExampleTopicsClient_CreateOrUpdateAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdateAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-6261",
|
||||
"sdk-Topics-1984",
|
||||
"sdk-AuthRules-4310",
|
||||
armservicebus.SBAuthorizationRule{
|
||||
Properties: &armservicebus.SBAuthorizationRuleProperties{
|
||||
Rights: []*armservicebus.AccessRights{
|
||||
|
@ -40,7 +38,6 @@ func ExampleTopicsClient_CreateOrUpdateAuthorizationRule() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleTopicsClient_DeleteAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.DeleteAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-6261",
|
||||
"sdk-Topics-1984",
|
||||
"sdk-AuthRules-4310",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleTopicsClient_GetAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<authorization-rule-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-6261",
|
||||
"sdk-Topics-1984",
|
||||
"sdk-AuthRules-4310",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleTopicsClient_NewListAuthorizationRulesPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListAuthorizationRulesPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
pager := client.NewListAuthorizationRulesPager("ArunMonocle",
|
||||
"sdk-Namespace-6261",
|
||||
"sdk-Topics-1984",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleTopicsClient_ListKeys() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("e2f361f0-3b27-4503-a9cc-21cfba380093", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.ListKeys(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<authorization-rule-name>",
|
||||
"Default-ServiceBus-WestUS",
|
||||
"sdk-Namespace8408",
|
||||
"sdk-Topics2075",
|
||||
"sdk-Authrules5067",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,26 +17,23 @@ func ExampleTopicsClient_RegenerateKeys() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("e2f361f0-3b27-4503-a9cc-21cfba380093", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.RegenerateKeys(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"<authorization-rule-name>",
|
||||
"Default-ServiceBus-WestUS",
|
||||
"sdk-Namespace8408",
|
||||
"sdk-Topics2075",
|
||||
"sdk-Authrules5067",
|
||||
armservicebus.RegenerateAccessKeyParameters{
|
||||
KeyType: to.Ptr(armservicebus.KeyTypePrimaryKey),
|
||||
},
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,18 +17,16 @@ func ExampleTopicsClient_CreateOrUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-1617",
|
||||
"sdk-Topics-5488",
|
||||
armservicebus.SBTopic{
|
||||
Properties: &armservicebus.SBTopicProperties{
|
||||
EnableExpress: to.Ptr(true),
|
||||
|
@ -37,7 +35,6 @@ func ExampleTopicsClient_CreateOrUpdate() {
|
|||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleTopicsClient_Delete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Delete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-1617",
|
||||
"sdk-Topics-5488",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleTopicsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<topic-name>",
|
||||
"ArunMonocle",
|
||||
"sdk-Namespace-1617",
|
||||
"sdk-Topics-5488",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,16 +16,14 @@ func ExampleTopicsClient_NewListByNamespacePager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewTopicsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewTopicsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListByNamespacePager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
pager := client.NewListByNamespacePager("Default-ServiceBus-WestUS",
|
||||
"sdk-Namespace-1617",
|
||||
&armservicebus.TopicsClientListByNamespaceOptions{Skip: nil,
|
||||
Top: nil,
|
||||
})
|
||||
|
@ -33,7 +31,6 @@ func ExampleTopicsClient_NewListByNamespacePager() {
|
|||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleDisasterRecoveryConfigsClient_GetAuthorizationRule() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetAuthorizationRule(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
"<authorization-rule-name>",
|
||||
"exampleResourceGroup",
|
||||
"sdk-Namespace-9080",
|
||||
"sdk-DisasterRecovery-4879",
|
||||
"sdk-Authrules-4879",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleDisasterRecoveryConfigsClient_NewListAuthorizationRulesPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListAuthorizationRulesPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
pager := client.NewListAuthorizationRulesPager("exampleResourceGroup",
|
||||
"sdk-Namespace-9080",
|
||||
"sdk-DisasterRecovery-4047",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleDisasterRecoveryConfigsClient_ListKeys() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.ListKeys(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
"<authorization-rule-name>",
|
||||
"exampleResourceGroup",
|
||||
"sdk-Namespace-2702",
|
||||
"sdk-DisasterRecovery-4047",
|
||||
"sdk-Authrules-1746",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,24 +17,21 @@ func ExampleDisasterRecoveryConfigsClient_CheckNameAvailability() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CheckNameAvailability(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"exampleResourceGroup",
|
||||
"sdk-Namespace-9080",
|
||||
armservicebus.CheckNameAvailability{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("sdk-DisasterRecovery-9474"),
|
||||
},
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -17,28 +17,25 @@ func ExampleDisasterRecoveryConfigsClient_CreateOrUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CreateOrUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
"ardsouzatestRG",
|
||||
"sdk-Namespace-8860",
|
||||
"sdk-Namespace-8860",
|
||||
armservicebus.ArmDisasterRecovery{
|
||||
Properties: &armservicebus.ArmDisasterRecoveryProperties{
|
||||
AlternateName: to.Ptr("<alternate-name>"),
|
||||
PartnerNamespace: to.Ptr("<partner-namespace>"),
|
||||
AlternateName: to.Ptr("alternameforAlias-Namespace-8860"),
|
||||
PartnerNamespace: to.Ptr("sdk-Namespace-37"),
|
||||
},
|
||||
},
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleDisasterRecoveryConfigsClient_Delete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Delete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
"SouthCentralUS",
|
||||
"sdk-Namespace-8860",
|
||||
"sdk-DisasterRecovery-3814",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleDisasterRecoveryConfigsClient_FailOver() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.FailOver(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
"ardsouzatestRG",
|
||||
"sdk-Namespace-8860",
|
||||
"sdk-DisasterRecovery-3814",
|
||||
&armservicebus.DisasterRecoveryConfigsClientFailOverOptions{Parameters: nil})
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleDisasterRecoveryConfigsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
"ardsouzatestRG",
|
||||
"sdk-Namespace-8860",
|
||||
"sdk-DisasterRecovery-3814",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
// TODO: use response item
|
||||
_ = res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleDisasterRecoveryConfigsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
pager := client.NewListPager("ardsouzatestRG",
|
||||
"sdk-Namespace-8860",
|
||||
nil)
|
||||
for pager.More() {
|
||||
nextResult, err := pager.NextPage(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to advance page: %v", err)
|
||||
return
|
||||
}
|
||||
for _, v := range nextResult.Value {
|
||||
// TODO: use page item
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv0.5.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fservicebus%2Farmservicebus%2Fv1.0.0/sdk/resourcemanager/servicebus/armservicebus/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armservicebus_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleDisasterRecoveryConfigsClient_BreakPairing() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("<subscription-id>", cred, nil)
|
||||
client, err := armservicebus.NewDisasterRecoveryConfigsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.BreakPairing(ctx,
|
||||
"<resource-group-name>",
|
||||
"<namespace-name>",
|
||||
"<alias>",
|
||||
"ardsouzatestRG",
|
||||
"sdk-Namespace-8860",
|
||||
"sdk-DisasterRecovery-3814",
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to finish the request: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче