[Automation] Collect examples from azure-sdk-for-go#sdk/resourcemanager/testbase/armtestbase/v0.5.0
Co-authored-by: azure-sdk <azuresdk@microsoft.com>
This commit is contained in:
Родитель
bf12100a43
Коммит
22885a2aaf
|
@ -1,4 +1,4 @@
|
|||
Read the [SDK documentation](https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleAvailableOSClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAvailableOSClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAvailableOSClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<available-osresource-name>",
|
||||
"contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
"Windows-10-2004",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleAvailableOSClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAvailableOSClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAvailableOSClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListPager("contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
armtestbase.OsUpdateTypeSecurityUpdate,
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,24 +16,21 @@ func ExampleAnalysisResultsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAnalysisResultsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAnalysisResultsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<test-result-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"Windows-10-1909-Test-Id",
|
||||
armtestbase.AnalysisResultNameCPURegression,
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,25 +16,22 @@ func ExampleAnalysisResultsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAnalysisResultsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAnalysisResultsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<test-result-name>",
|
||||
pager := client.NewListPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"Windows-10-1909-Test-Id",
|
||||
armtestbase.AnalysisResultTypeCPURegression,
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -17,27 +17,24 @@ func ExampleAccountsClient_CheckPackageNameAvailability() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.CheckPackageNameAvailability(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
armtestbase.PackageCheckNameAvailabilityParameters{
|
||||
Name: to.Ptr("<name>"),
|
||||
Type: to.Ptr("<type>"),
|
||||
ApplicationName: to.Ptr("<application-name>"),
|
||||
Version: to.Ptr("<version>"),
|
||||
Name: to.Ptr("testApp"),
|
||||
Type: to.Ptr("Microsoft.TestBase/testBaseAccounts/packages"),
|
||||
ApplicationName: to.Ptr("testApp"),
|
||||
Version: to.Ptr("1.0.0"),
|
||||
},
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
|
@ -19,24 +17,22 @@ func ExampleCustomerEventsClient_BeginCreate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewCustomerEventsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewCustomerEventsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginCreate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<customer-event-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"WeeklySummary",
|
||||
armtestbase.CustomerEventResource{
|
||||
Properties: &armtestbase.CustomerEventProperties{
|
||||
EventName: to.Ptr("<event-name>"),
|
||||
EventName: to.Ptr("WeeklySummary"),
|
||||
Receivers: []*armtestbase.NotificationEventReceiver{
|
||||
{
|
||||
ReceiverType: to.Ptr("<receiver-type>"),
|
||||
ReceiverType: to.Ptr("UserObjects"),
|
||||
ReceiverValue: &armtestbase.NotificationReceiverValue{
|
||||
UserObjectReceiverValue: &armtestbase.UserObjectReceiverValue{
|
||||
UserObjectIDs: []*string{
|
||||
|
@ -46,7 +42,7 @@ func ExampleCustomerEventsClient_BeginCreate() {
|
|||
},
|
||||
},
|
||||
{
|
||||
ReceiverType: to.Ptr("<receiver-type>"),
|
||||
ReceiverType: to.Ptr("DistributionGroup"),
|
||||
ReceiverValue: &armtestbase.NotificationReceiverValue{
|
||||
DistributionGroupListReceiverValue: &armtestbase.DistributionGroupListReceiverValue{
|
||||
DistributionGroups: []*string{
|
||||
|
@ -56,15 +52,13 @@ func ExampleCustomerEventsClient_BeginCreate() {
|
|||
}},
|
||||
},
|
||||
},
|
||||
&armtestbase.CustomerEventsClientBeginCreateOptions{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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
)
|
||||
|
@ -18,27 +16,23 @@ func ExampleCustomerEventsClient_BeginDelete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewCustomerEventsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewCustomerEventsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginDelete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<customer-event-name>",
|
||||
&armtestbase.CustomerEventsClientBeginDeleteOptions{ResumeToken: ""})
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"WeeklySummary",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleCustomerEventsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewCustomerEventsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewCustomerEventsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<customer-event-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"WeeklySummary",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleCustomerEventsClient_NewListByTestBaseAccountPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewCustomerEventsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewCustomerEventsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListByTestBaseAccountPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListByTestBaseAccountPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleEmailEventsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewEmailEventsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewEmailEventsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<email-event-resource-name>",
|
||||
"contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
"weekly-summary",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleEmailEventsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewEmailEventsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewEmailEventsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListPager("contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -17,28 +17,25 @@ func ExampleFavoriteProcessesClient_Create() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Create(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<favorite-process-resource-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"testAppProcess",
|
||||
armtestbase.FavoriteProcessResource{
|
||||
Properties: &armtestbase.FavoriteProcessProperties{
|
||||
ActualProcessName: to.Ptr("<actual-process-name>"),
|
||||
ActualProcessName: to.Ptr("testApp&.exe"),
|
||||
},
|
||||
},
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleFavoriteProcessesClient_Delete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
_, err = client.Delete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<favorite-process-resource-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"testAppProcess",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleFavoriteProcessesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<favorite-process-resource-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"testAppProcess",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleFavoriteProcessesClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewFavoriteProcessesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
pager := client.NewListPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleFlightingRingsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewFlightingRingsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewFlightingRingsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<flighting-ring-resource-name>",
|
||||
"contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
"Insider-Beta-Channel",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleFlightingRingsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewFlightingRingsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewFlightingRingsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListPager("contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleOSUpdatesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewOSUpdatesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewOSUpdatesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<os-update-resource-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"Windows-10-2004-2020-12-B-505",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,24 +16,21 @@ func ExampleOSUpdatesClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewOSUpdatesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewOSUpdatesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
pager := client.NewListPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
armtestbase.OsUpdateTypeSecurityUpdate,
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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 := armtestbase.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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
|
@ -19,28 +17,26 @@ func ExamplePackagesClient_BeginCreate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewPackagesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewPackagesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginCreate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
armtestbase.PackageResource{
|
||||
Location: to.Ptr("<location>"),
|
||||
Location: to.Ptr("westus"),
|
||||
Tags: map[string]*string{},
|
||||
Properties: &armtestbase.PackageProperties{
|
||||
ApplicationName: to.Ptr("<application-name>"),
|
||||
BlobPath: to.Ptr("<blob-path>"),
|
||||
FlightingRing: to.Ptr("<flighting-ring>"),
|
||||
ApplicationName: to.Ptr("contoso-package2"),
|
||||
BlobPath: to.Ptr("storageAccountPath/package.zip"),
|
||||
FlightingRing: to.Ptr("Insider Beta Channel"),
|
||||
TargetOSList: []*armtestbase.TargetOSInfo{
|
||||
{
|
||||
OSUpdateType: to.Ptr("<osupdate-type>"),
|
||||
OSUpdateType: to.Ptr("Security updates"),
|
||||
TargetOSs: []*string{
|
||||
to.Ptr("Windows 10 2004"),
|
||||
to.Ptr("Windows 10 1903")},
|
||||
|
@ -51,11 +47,11 @@ func ExamplePackagesClient_BeginCreate() {
|
|||
TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
|
||||
Commands: []*armtestbase.Command{
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Install"),
|
||||
Action: to.Ptr(armtestbase.ActionInstall),
|
||||
AlwaysRun: to.Ptr(true),
|
||||
ApplyUpdateBefore: to.Ptr(false),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/install/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(true),
|
||||
|
@ -63,11 +59,11 @@ func ExamplePackagesClient_BeginCreate() {
|
|||
RunElevated: to.Ptr(true),
|
||||
},
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Launch"),
|
||||
Action: to.Ptr(armtestbase.ActionLaunch),
|
||||
AlwaysRun: to.Ptr(false),
|
||||
ApplyUpdateBefore: to.Ptr(true),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/launch/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(false),
|
||||
|
@ -75,11 +71,11 @@ func ExamplePackagesClient_BeginCreate() {
|
|||
RunElevated: to.Ptr(true),
|
||||
},
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Close"),
|
||||
Action: to.Ptr(armtestbase.ActionClose),
|
||||
AlwaysRun: to.Ptr(false),
|
||||
ApplyUpdateBefore: to.Ptr(false),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/close/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(false),
|
||||
|
@ -87,11 +83,11 @@ func ExamplePackagesClient_BeginCreate() {
|
|||
RunElevated: to.Ptr(true),
|
||||
},
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Uninstall"),
|
||||
Action: to.Ptr(armtestbase.ActionUninstall),
|
||||
AlwaysRun: to.Ptr(true),
|
||||
ApplyUpdateBefore: to.Ptr(false),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/uninstall/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(false),
|
||||
|
@ -99,18 +95,16 @@ func ExamplePackagesClient_BeginCreate() {
|
|||
RunElevated: to.Ptr(true),
|
||||
}},
|
||||
}},
|
||||
Version: to.Ptr("<version>"),
|
||||
Version: to.Ptr("1.0.0"),
|
||||
},
|
||||
},
|
||||
&armtestbase.PackagesClientBeginCreateOptions{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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
)
|
||||
|
@ -18,27 +16,23 @@ func ExamplePackagesClient_BeginDelete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewPackagesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewPackagesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginDelete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
&armtestbase.PackagesClientBeginDeleteOptions{ResumeToken: ""})
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExamplePackagesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewPackagesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewPackagesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExamplePackagesClient_GetDownloadURL() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewPackagesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewPackagesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetDownloadURL(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
)
|
||||
|
@ -18,27 +16,23 @@ func ExamplePackagesClient_BeginHardDelete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewPackagesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewPackagesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginHardDelete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
&armtestbase.PackagesClientBeginHardDeleteOptions{ResumeToken: ""})
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
|
@ -19,26 +17,24 @@ func ExamplePackagesClient_BeginUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewPackagesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewPackagesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
armtestbase.PackageUpdateParameters{
|
||||
Properties: &armtestbase.PackageUpdateParameterProperties{
|
||||
BlobPath: to.Ptr("<blob-path>"),
|
||||
FlightingRing: to.Ptr("<flighting-ring>"),
|
||||
BlobPath: to.Ptr("storageAccountPath/package.zip"),
|
||||
FlightingRing: to.Ptr("Insider Beta Channel"),
|
||||
IsEnabled: to.Ptr(false),
|
||||
TargetOSList: []*armtestbase.TargetOSInfo{
|
||||
{
|
||||
OSUpdateType: to.Ptr("<osupdate-type>"),
|
||||
OSUpdateType: to.Ptr("Security updates"),
|
||||
TargetOSs: []*string{
|
||||
to.Ptr("Windows 10 2004"),
|
||||
to.Ptr("Windows 10 1903")},
|
||||
|
@ -49,11 +45,11 @@ func ExamplePackagesClient_BeginUpdate() {
|
|||
TestType: to.Ptr(armtestbase.TestTypeOutOfBoxTest),
|
||||
Commands: []*armtestbase.Command{
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Install"),
|
||||
Action: to.Ptr(armtestbase.ActionInstall),
|
||||
AlwaysRun: to.Ptr(true),
|
||||
ApplyUpdateBefore: to.Ptr(false),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/install/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(true),
|
||||
|
@ -61,11 +57,11 @@ func ExamplePackagesClient_BeginUpdate() {
|
|||
RunElevated: to.Ptr(true),
|
||||
},
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Launch"),
|
||||
Action: to.Ptr(armtestbase.ActionLaunch),
|
||||
AlwaysRun: to.Ptr(false),
|
||||
ApplyUpdateBefore: to.Ptr(true),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/launch/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(false),
|
||||
|
@ -73,11 +69,11 @@ func ExamplePackagesClient_BeginUpdate() {
|
|||
RunElevated: to.Ptr(true),
|
||||
},
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Close"),
|
||||
Action: to.Ptr(armtestbase.ActionClose),
|
||||
AlwaysRun: to.Ptr(false),
|
||||
ApplyUpdateBefore: to.Ptr(false),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/close/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(false),
|
||||
|
@ -85,11 +81,11 @@ func ExamplePackagesClient_BeginUpdate() {
|
|||
RunElevated: to.Ptr(true),
|
||||
},
|
||||
{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("Uninstall"),
|
||||
Action: to.Ptr(armtestbase.ActionUninstall),
|
||||
AlwaysRun: to.Ptr(true),
|
||||
ApplyUpdateBefore: to.Ptr(false),
|
||||
Content: to.Ptr("<content>"),
|
||||
Content: to.Ptr("app/scripts/uninstall/job.ps1"),
|
||||
ContentType: to.Ptr(armtestbase.ContentTypePath),
|
||||
MaxRunTime: to.Ptr[int32](1800),
|
||||
RestartAfter: to.Ptr(false),
|
||||
|
@ -100,15 +96,13 @@ func ExamplePackagesClient_BeginUpdate() {
|
|||
},
|
||||
Tags: map[string]*string{},
|
||||
},
|
||||
&armtestbase.PackagesClientBeginUpdateOptions{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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExamplePackagesClient_NewListByTestBaseAccountPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewPackagesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewPackagesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListByTestBaseAccountPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListByTestBaseAccountPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
|
@ -19,37 +17,31 @@ func ExampleAccountsClient_BeginCreate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginCreate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
armtestbase.AccountResource{
|
||||
Location: to.Ptr("<location>"),
|
||||
Location: to.Ptr("westus"),
|
||||
Properties: &armtestbase.AccountResourceProperties{
|
||||
SKU: &armtestbase.AccountSKU{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("S0"),
|
||||
Tier: to.Ptr(armtestbase.TierStandard),
|
||||
},
|
||||
},
|
||||
},
|
||||
&armtestbase.AccountsClientBeginCreateOptions{Restore: nil,
|
||||
ResumeToken: "",
|
||||
})
|
||||
&armtestbase.AccountsClientBeginCreateOptions{Restore: 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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
)
|
||||
|
@ -18,26 +16,22 @@ func ExampleAccountsClient_BeginDelete() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginDelete(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
&armtestbase.AccountsClientBeginDeleteOptions{ResumeToken: ""})
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,21 +16,18 @@ func ExampleAccountsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
)
|
||||
|
@ -18,26 +16,22 @@ func ExampleAccountsClient_BeginOffboard() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginOffboard(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
&armtestbase.AccountsClientBeginOffboardOptions{ResumeToken: ""})
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,20 +16,17 @@ func ExampleSKUsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewSKUsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewSKUsClient("476f61a4-952c-422a-b4db-568a828f35df", 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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_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/testbase/armtestbase"
|
||||
|
@ -19,34 +17,30 @@ func ExampleAccountsClient_BeginUpdate() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
poller, err := client.BeginUpdate(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
armtestbase.AccountUpdateParameters{
|
||||
Properties: &armtestbase.AccountUpdateParameterProperties{
|
||||
SKU: &armtestbase.AccountSKU{
|
||||
Name: to.Ptr("<name>"),
|
||||
Name: to.Ptr("S0"),
|
||||
Tier: to.Ptr(armtestbase.TierStandard),
|
||||
},
|
||||
},
|
||||
},
|
||||
&armtestbase.AccountsClientBeginUpdateOptions{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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleUsageClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewUsageClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewUsageClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
&armtestbase.UsageClientListOptions{Filter: 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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,21 +16,18 @@ func ExampleAccountsClient_NewListByResourceGroupPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListByResourceGroupPager("<resource-group-name>",
|
||||
pager := client.NewListByResourceGroupPager("contoso-rg1",
|
||||
&armtestbase.AccountsClientListByResourceGroupOptions{GetDeleted: 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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,20 +16,17 @@ func ExampleAccountsClient_NewListBySubscriptionPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewAccountsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewAccountsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListBySubscriptionPager(&armtestbase.AccountsClientListBySubscriptionOptions{GetDeleted: 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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleTestResultsClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestResultsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestResultsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<test-result-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleTestResultsClient_GetDownloadURL() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestResultsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestResultsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetDownloadURL(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<test-result-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,23 +16,20 @@ func ExampleTestResultsClient_GetVideoDownloadURL() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestResultsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestResultsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.GetVideoDownloadURL(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
"<test-result-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
"Windows-10-1909-99b1f80d-03a9-4148-997f-806ba5bac8e0",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -17,24 +17,21 @@ func ExampleTestResultsClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestResultsClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestResultsClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<package-name>",
|
||||
pager := client.NewListPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2",
|
||||
armtestbase.OsUpdateTypeSecurityUpdate,
|
||||
&armtestbase.TestResultsClientListOptions{Filter: to.Ptr("<filter>")})
|
||||
&armtestbase.TestResultsClientListOptions{Filter: to.Ptr("osName eq 'Windows 10 2004' and releaseName eq '2020.11B'")})
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleTestSummariesClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestSummariesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestSummariesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListPager("contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleTestSummariesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestSummariesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestSummariesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<test-summary-name>",
|
||||
"contoso-rg1",
|
||||
"contoso-testBaseAccount1",
|
||||
"contoso-package2-096bffb5-5d3d-4305-a66a-953372ed6e88",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleTestTypesClient_Get() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestTypesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestTypesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
res, err := client.Get(ctx,
|
||||
"<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
"<test-type-resource-name>",
|
||||
"contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
"Functional-Test",
|
||||
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%2Ftestbase%2Farmtestbase%2Fv0.4.0/sdk/resourcemanager/testbase/armtestbase/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%2Ftestbase%2Farmtestbase%2Fv0.5.0/sdk/resourcemanager/testbase/armtestbase/README.md) on how to add the SDK to your project and authenticate.
|
||||
|
||||
```go
|
||||
package armtestbase_test
|
||||
|
@ -16,22 +16,19 @@ func ExampleTestTypesClient_NewListPager() {
|
|||
cred, err := azidentity.NewDefaultAzureCredential(nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to obtain a credential: %v", err)
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
client, err := armtestbase.NewTestTypesClient("<subscription-id>", cred, nil)
|
||||
client, err := armtestbase.NewTestTypesClient("476f61a4-952c-422a-b4db-568a828f35df", cred, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create client: %v", err)
|
||||
return
|
||||
}
|
||||
pager := client.NewListPager("<resource-group-name>",
|
||||
"<test-base-account-name>",
|
||||
pager := client.NewListPager("contoso-rg",
|
||||
"contoso-testBaseAccount",
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче