diff --git a/sdk/resourcemanager/automation/armautomation/CHANGELOG.md b/sdk/resourcemanager/automation/armautomation/CHANGELOG.md index ef44ffb1a0a5..57ffe6673128 100644 --- a/sdk/resourcemanager/automation/armautomation/CHANGELOG.md +++ b/sdk/resourcemanager/automation/armautomation/CHANGELOG.md @@ -1,5 +1,40 @@ # Release History +## 0.9.0 (2023-10-12) +### Breaking Changes + +- Type of `Identity.UserAssignedIdentities` has been changed from `map[string]*ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties` to `map[string]*UserAssignedIdentitiesProperties` +- Struct `ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties` has been removed +- Field `Value` of struct `DscConfigurationClientGetContentResponse` has been removed + +### Features Added + +- New value `ModuleProvisioningStateCanceled` added to enum type `ModuleProvisioningState` +- New value `RunbookTypeEnumPowerShell72` added to enum type `RunbookTypeEnum` +- New function `*ClientFactory.NewPowerShell72ModuleClient() *PowerShell72ModuleClient` +- New function `*ClientFactory.NewPython3PackageClient() *Python3PackageClient` +- New function `NewPowerShell72ModuleClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PowerShell72ModuleClient, error)` +- New function `*PowerShell72ModuleClient.CreateOrUpdate(context.Context, string, string, string, ModuleCreateOrUpdateParameters, *PowerShell72ModuleClientCreateOrUpdateOptions) (PowerShell72ModuleClientCreateOrUpdateResponse, error)` +- New function `*PowerShell72ModuleClient.Delete(context.Context, string, string, string, *PowerShell72ModuleClientDeleteOptions) (PowerShell72ModuleClientDeleteResponse, error)` +- New function `*PowerShell72ModuleClient.Get(context.Context, string, string, string, *PowerShell72ModuleClientGetOptions) (PowerShell72ModuleClientGetResponse, error)` +- New function `*PowerShell72ModuleClient.NewListByAutomationAccountPager(string, string, *PowerShell72ModuleClientListByAutomationAccountOptions) *runtime.Pager[PowerShell72ModuleClientListByAutomationAccountResponse]` +- New function `*PowerShell72ModuleClient.Update(context.Context, string, string, string, ModuleUpdateParameters, *PowerShell72ModuleClientUpdateOptions) (PowerShell72ModuleClientUpdateResponse, error)` +- New function `NewPython3PackageClient(string, azcore.TokenCredential, *arm.ClientOptions) (*Python3PackageClient, error)` +- New function `*Python3PackageClient.CreateOrUpdate(context.Context, string, string, string, PythonPackageCreateParameters, *Python3PackageClientCreateOrUpdateOptions) (Python3PackageClientCreateOrUpdateResponse, error)` +- New function `*Python3PackageClient.Delete(context.Context, string, string, string, *Python3PackageClientDeleteOptions) (Python3PackageClientDeleteResponse, error)` +- New function `*Python3PackageClient.Get(context.Context, string, string, string, *Python3PackageClientGetOptions) (Python3PackageClientGetResponse, error)` +- New function `*Python3PackageClient.NewListByAutomationAccountPager(string, string, *Python3PackageClientListByAutomationAccountOptions) *runtime.Pager[Python3PackageClientListByAutomationAccountResponse]` +- New function `*Python3PackageClient.Update(context.Context, string, string, string, PythonPackageUpdateParameters, *Python3PackageClientUpdateOptions) (Python3PackageClientUpdateResponse, error)` +- New struct `Dimension` +- New struct `LogSpecification` +- New struct `MetricSpecification` +- New struct `OperationPropertiesFormat` +- New struct `OperationPropertiesFormatServiceSpecification` +- New struct `UserAssignedIdentitiesProperties` +- New field `Origin`, `Properties` in struct `Operation` +- New field `Description` in struct `OperationDisplay` + + ## 0.8.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/automation/armautomation/account_client.go b/sdk/resourcemanager/automation/armautomation/account_client.go index 24974791e5b4..98d0c6148eb5 100644 --- a/sdk/resourcemanager/automation/armautomation/account_client.go +++ b/sdk/resourcemanager/automation/armautomation/account_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,24 +47,27 @@ func NewAccountClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Create or update automation account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - parameters - Parameters supplied to the create or update automation account. // - options - AccountClientCreateOrUpdateOptions contains the optional parameters for the AccountClient.CreateOrUpdate method. func (client *AccountClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountCreateOrUpdateParameters, options *AccountClientCreateOrUpdateOptions) (AccountClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, parameters, options) if err != nil { return AccountClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AccountClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AccountClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -88,10 +90,13 @@ func (client *AccountClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -106,21 +111,23 @@ func (client *AccountClient) createOrUpdateHandleResponse(resp *http.Response) ( // Delete - Delete an automation account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - AccountClientDeleteOptions contains the optional parameters for the AccountClient.Delete method. func (client *AccountClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, options *AccountClientDeleteOptions) (AccountClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return AccountClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AccountClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AccountClientDeleteResponse{}, err } return AccountClientDeleteResponse{}, nil } @@ -145,7 +152,7 @@ func (client *AccountClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -154,23 +161,26 @@ func (client *AccountClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Get information about an Automation Account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. func (client *AccountClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, options *AccountClientGetOptions) (AccountClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return AccountClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -193,7 +203,7 @@ func (client *AccountClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -210,7 +220,7 @@ func (client *AccountClient) getHandleResponse(resp *http.Response) (AccountClie // NewListPager - Retrieve a list of accounts within a given subscription. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - options - AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method. func (client *AccountClient) NewListPager(options *AccountClientListOptions) *runtime.Pager[AccountClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AccountClientListResponse]{ @@ -252,7 +262,7 @@ func (client *AccountClient) listCreateRequest(ctx context.Context, options *Acc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,7 +279,7 @@ func (client *AccountClient) listHandleResponse(resp *http.Response) (AccountCli // NewListByResourceGroupPager - Retrieve a list of accounts within a given resource group. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - options - AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager // method. @@ -317,7 +327,7 @@ func (client *AccountClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -335,24 +345,27 @@ func (client *AccountClient) listByResourceGroupHandleResponse(resp *http.Respon // Update - Update an automation account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - parameters - Parameters supplied to the update automation account. // - options - AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method. func (client *AccountClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountUpdateParameters, options *AccountClientUpdateOptions) (AccountClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, parameters, options) if err != nil { return AccountClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AccountClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -375,10 +388,13 @@ func (client *AccountClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/account_client_example_test.go b/sdk/resourcemanager/automation/armautomation/account_client_example_test.go deleted file mode 100644 index fba96c2cda09..000000000000 --- a/sdk/resourcemanager/automation/armautomation/account_client_example_test.go +++ /dev/null @@ -1,1009 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/updateAutomationAccount.json -func ExampleAccountClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountClient().Update(ctx, "rg", "myAutomationAccount9", armautomation.AccountUpdateParameters{ - Name: to.Ptr("myAutomationAccount9"), - Location: to.Ptr("East US 2"), - Properties: &armautomation.AccountUpdateProperties{ - SKU: &armautomation.SKU{ - Name: to.Ptr(armautomation.SKUNameEnumFree), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armautomation.Account{ - // Name: to.Ptr("myAutomationAccount9"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T01:13:43.267+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T01:13:43.267+00:00"); return t}()), - // SKU: &armautomation.SKU{ - // Name: to.Ptr(armautomation.SKUNameEnumFree), - // }, - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/createOrUpdateAutomationAccount.json -func ExampleAccountClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount9", armautomation.AccountCreateOrUpdateParameters{ - Name: to.Ptr("myAutomationAccount9"), - Location: to.Ptr("East US 2"), - Properties: &armautomation.AccountCreateOrUpdateProperties{ - SKU: &armautomation.SKU{ - Name: to.Ptr(armautomation.SKUNameEnumFree), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armautomation.Account{ - // Name: to.Ptr("ContoseAutomationAccount"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:21:15.187+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmaild@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:21:15.187+00:00"); return t}()), - // SKU: &armautomation.SKU{ - // Name: to.Ptr(armautomation.SKUNameEnumFree), - // }, - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/deleteAutomationAccount.json -func ExampleAccountClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewAccountClient().Delete(ctx, "rg", "myAutomationAccount9", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getAutomationAccount.json -func ExampleAccountClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAccountClient().Get(ctx, "rg", "myAutomationAccount9", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Account = armautomation.Account{ - // Name: to.Ptr("myAutomationAccount9"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T01:13:43.267+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T01:13:43.267+00:00"); return t}()), - // SKU: &armautomation.SKU{ - // Name: to.Ptr(armautomation.SKUNameEnumFree), - // }, - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listAutomationAccountsByResourceGroup.json -func ExampleAccountClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAccountClient().NewListByResourceGroupPager("rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AccountListResult = armautomation.AccountListResult{ - // Value: []*armautomation.Account{ - // { - // Name: to.Ptr("myaccount"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myaccount"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-24T00:47:04.227+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAccount123"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAccount123"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-29T00:32:32.52+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAccountasfads"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAccountasfads"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:21:03.27+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:21:03.27+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount1"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:22:33.26+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:22:33.26+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount11"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:10:24.523+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:12.027+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount2"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:20.31+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:20.31+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount3"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount3"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:43.967+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:43.967+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount4"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount4"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:04:56.9+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:04:56.9+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount6"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount6"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:10:44.567+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:10:44.567+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount7"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount7"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:19:17.943+00:00"); return t}()), - // LastModifiedBy: to.Ptr("myEmailId@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:19:17.943+00:00"); return t}()), - // State: to.Ptr(armautomation.AutomationAccountStateOk), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listAutomationAccountsBySubscription.json -func ExampleAccountClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAccountClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AccountListResult = armautomation.AccountListResult{ - // Value: []*armautomation.Account{ - // { - // Name: to.Ptr("JPEDDeployDSC1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/JPEDeploy1/providers/Microsoft.Automation/automationAccounts/JPEDDeployDSC1"), - // Location: to.Ptr("japaneast"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-04-28T23:48:25.143+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.06+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("jpeDemoAutomation1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/jpeDemo1/providers/Microsoft.Automation/automationAccounts/jpeDemoAutomation1"), - // Location: to.Ptr("japaneast"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-04-25T02:04:10.223+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.06+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("ASEAutomationAccount1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/ASERG1/providers/Microsoft.Automation/automationAccounts/ASEAutomationAccount1"), - // Location: to.Ptr("australiasoutheast"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-04-12T05:19:19.48+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.64+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("AAEU2DSCDemo"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/eus2Demo1/providers/Microsoft.Automation/automationAccounts/AAEU2DSCDemo"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-08-04T14:44:02.397+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("AAEU2DSCDemo2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/eus2Demo1/providers/Microsoft.Automation/automationAccounts/AAEU2DSCDemo2"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-08-04T15:03:45.977+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("AAsnoverDemo1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/aadscdemo1/providers/Microsoft.Automation/automationAccounts/AAsnoverDemo1"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-01-29T02:29:13.18+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("automationaccdelete"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/oaastest/providers/Microsoft.Automation/automationAccounts/automationaccdelete"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T20:30:49.97+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("mytest1212"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/aadscdemo2/providers/Microsoft.Automation/automationAccounts/mytest1212"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-12T20:25:36.34+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("deleteacc"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/CIDRG/providers/Microsoft.Automation/automationAccounts/deleteacc"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-12T22:13:39.79+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("deleteme"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/test/providers/Microsoft.Automation/automationAccounts/deleteme"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-12T21:56:10.267+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("deleteme3"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/tst/providers/Microsoft.Automation/automationAccounts/deleteme3"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-12T22:00:51.333+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Eus2Account1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/OaaSCSXASVNLMD6CUTP2UKUNHMCSLLJRVOSRAS2HOBKX4B3A3UBNLZWZEA-East-US/providers/Microsoft.Automation/automationAccounts/Eus2Account1"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-19T19:07:43.2+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("EUS2DDeployDSC1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/EUS2Deploy1/providers/Microsoft.Automation/automationAccounts/EUS2DDeployDSC1"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-04-28T23:50:56.16+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("eusAccount2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/OaaSCSXASVNLMD6CUTP2UKUNHMCSLLJRVOSRAS2HOBKX4B3A3UBNLZWZEA-East-US/providers/Microsoft.Automation/automationAccounts/eusAccount2"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-19T19:12:19.853+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myProdAutomation1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/myProdAutomation1"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-16T21:31:06.333+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-16T21:31:06.333+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myProdDevAutomation"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/myProdDevAutomation"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-27T21:11:16.71+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myProdPublicAutomation"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/myProdPublicAutomation"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-11-18T19:49:08.893+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myTestaccount"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myTestaccount"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-24T00:47:04.227+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("kjohn-sandbox-eus"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/kjohn-sandbox-eus"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T17:29:18.493+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T17:29:18.493+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("kjohn-sandbox-eus-proddev"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/kjohn-sandbox-eus-proddev"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-06T02:33:10.29+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("kjohn-sandbox-eus-prodtest"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/kjohn-rg/providers/Microsoft.Automation/automationAccounts/kjohn-sandbox-eus-prodtest"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-10T23:40:13.103+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("kjohn-sandbox-eus-prodtest2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/kjohn-rg/providers/Microsoft.Automation/automationAccounts/kjohn-sandbox-eus-prodtest2"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-11T00:20:50.463+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("LinuxPatchingOpsEUS-AA2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/LinuxPatchingOpsEUS-AA2"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-24T03:17:00.043+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("LinuxTestNewAA"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/LinuxTestNewAA"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-23T18:50:54.887+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("psrdfeAccount2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/OaasCSsubid-east-us/providers/Microsoft.Automation/automationAccounts/psrdfeAccount2"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-05-05T00:26:49.02+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("my-account-one"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/myrg/providers/Microsoft.Automation/automationAccounts/my-account-one"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-27T17:54:31.007+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myku-no-vms"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/myku-no-vms"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-30T01:12:00.853+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myku-win-vms"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/myku-win-vms"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-30T01:17:07.613+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("SVCPrnAcctTest1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/aadscdemo2/providers/Microsoft.Automation/automationAccounts/SVCPrnAcctTest1"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-28T20:12:48.163+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("testfgbhfghfgh"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/tesdbgfvfhgjghjgh/providers/Microsoft.Automation/automationAccounts/testfgbhfghfgh"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-12T20:48:59.3+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("test-linux-linuxopsworkspace"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-eus/providers/Microsoft.Automation/automationAccounts/test-linux-linuxopsworkspace"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-23T18:59:56.99+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("my-dsc-test-1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my-dev/providers/Microsoft.Automation/automationAccounts/my-dsc-test-1"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-11-10T00:21:05.133+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("my-test-automation-1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my-dev/providers/Microsoft.Automation/automationAccounts/my-test-automation-1"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-11-09T19:57:50.043+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAccount"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/myresourcegroupeus/providers/Microsoft.Automation/automationAccounts/myAccount"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T19:10:30.453+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T19:10:30.453+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAccount123"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAccount123"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-29T00:32:32.52+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAccountasfads"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAccountasfads"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:21:03.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:21:03.27+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAccountEUS"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/myResourceGroupEUS/providers/Microsoft.Automation/automationAccounts/myAccountEUS"), - // Location: to.Ptr("eastus2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-29T23:13:38.873+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount1"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:22:33.26+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:22:33.26+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount11"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:10:24.523+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:12.027+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount2"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:20.31+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:20.31+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount3"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount3"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:43.967+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-24T23:24:43.967+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount4"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount4"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:04:56.9+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:04:56.9+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount6"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount6"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:10:44.567+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:10:44.567+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myAutomationAccount7"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount7"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:19:17.943+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-25T02:19:17.943+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("CSSCase1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/WEURG1/providers/Microsoft.Automation/automationAccounts/CSSCase1"), - // Location: to.Ptr("westeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-18T05:53:58.91+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.373+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("deleteme"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my/providers/Microsoft.Automation/automationAccounts/deleteme"), - // Location: to.Ptr("westeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-12T21:48:47.98+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.373+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("LinuxPatchingOpsWEU-AA2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/mms-weu/providers/Microsoft.Automation/automationAccounts/LinuxPatchingOpsWEU-AA2"), - // Location: to.Ptr("westeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-24T02:27:35.713+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.373+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("LinuxPatchJobs"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my-dev/providers/Microsoft.Automation/automationAccounts/LinuxPatchJobs"), - // Location: to.Ptr("westeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-14T22:02:28.223+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.373+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("MyCoolAAC1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/IgnniteRG/providers/Microsoft.Automation/automationAccounts/MyCoolAAC1"), - // Location: to.Ptr("westeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-22T05:59:22.443+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.373+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("MyCoolACT1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/IgnniteRG/providers/Microsoft.Automation/automationAccounts/MyCoolACT1"), - // Location: to.Ptr("westeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-22T06:05:18.5+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.373+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("MyTestmyTest-WEU"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/OaaSCSXASVNLMD6CUTP2UKUNHMCSLLJRVOSRAS2HOBKX4B3A3UBNLZWZEA-West-Europe/providers/Microsoft.Automation/automationAccounts/MyTestmyTest-WEU"), - // Location: to.Ptr("West Europe"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-11-12T02:48:51.473+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.373+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("WEDDeployDSC1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/WEDeploy1/providers/Microsoft.Automation/automationAccounts/WEDDeployDSC1"), - // Location: to.Ptr("westeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-04-28T23:20:01.73+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-13T08:43:47.36+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("SEADDeployDSC1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/SEADeploy1/providers/Microsoft.Automation/automationAccounts/SEADDeployDSC1"), - // Location: to.Ptr("southeamyia"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-04-28T19:06:39.1+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.683+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("seaDemoAutomation1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/seaDemo1/providers/Microsoft.Automation/automationAccounts/seaDemoAutomation1"), - // Location: to.Ptr("southeamyia"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-04-25T01:31:32.15+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:16.683+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("AAsnoverDemo2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/aadscdemo1/providers/Microsoft.Automation/automationAccounts/AAsnoverDemo2"), - // Location: to.Ptr("South Central US"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-01-29T02:30:05.84+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:17.107+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("SCUSDDeployDSC1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/SCUSDeploy1/providers/Microsoft.Automation/automationAccounts/SCUSDDeployDSC1"), - // Location: to.Ptr("southcentralus"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-06-04T23:06:44.897+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:17.107+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("scusposthydtest1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/eus2Demo1/providers/Microsoft.Automation/automationAccounts/scusposthydtest1"), - // Location: to.Ptr("South Central US"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-06-04T16:44:18.823+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:17.107+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("scustestaccount1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/OaaSCSXASVNLMD6CUTP2UKUNHMCSLLJRVOSRAS2HOBKX4B3A3UBNLZWZEA-South-Central-US/providers/Microsoft.Automation/automationAccounts/scustestaccount1"), - // Location: to.Ptr("South Central US"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-05-30T01:54:57.313+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:17.107+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("AAUKSmyTest1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/UKSRG1/providers/Microsoft.Automation/automationAccounts/AAUKSmyTest1"), - // Location: to.Ptr("uksouth"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-15T02:31:03.19+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-15T02:31:03.19+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Tip-WCUS-AutomationAccount"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/Gaurav_machines/providers/Microsoft.Automation/automationAccounts/Tip-WCUS-AutomationAccount"), - // Location: to.Ptr("westcentralus"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-08T19:53:36.2933333+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-08T19:53:36.2933333+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("aa-my"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/myRG/providers/Microsoft.Automation/automationAccounts/aa-my"), - // Location: to.Ptr("northeurope"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-21T18:59:56.26+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:15.457+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("CIDAccout1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/CIDRG/providers/Microsoft.Automation/automationAccounts/CIDAccout1"), - // Location: to.Ptr("Central India"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-02-24T20:04:58.867+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:19.003+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("aaspntest"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my/providers/Microsoft.Automation/automationAccounts/aaspntest"), - // Location: to.Ptr("northcentralus"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-06T17:18:51.88+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:19.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("dsccomposite"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my/providers/Microsoft.Automation/automationAccounts/dsccomposite"), - // Location: to.Ptr("northcentralus"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-13T17:37:55.163+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-06T17:19:15.09+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("dsclinux"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my/providers/Microsoft.Automation/automationAccounts/dsclinux"), - // Location: to.Ptr("northcentralus"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-06T21:50:05.493+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-06T21:50:05.493+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("mydsc"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my/providers/Microsoft.Automation/automationAccounts/mydsc"), - // Location: to.Ptr("northcentralus"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-11-01T17:28:36.197+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-09T21:35:19.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("mydsc2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/my/providers/Microsoft.Automation/automationAccounts/mydsc2"), - // Location: to.Ptr("northcentralus"), - // Properties: &armautomation.AccountProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-11-01T18:50:06.063+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-11T01:33:13.113+00:00"); return t}()), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/activity_client.go b/sdk/resourcemanager/automation/armautomation/activity_client.go index 45ef2f69d9b3..1503b972261d 100644 --- a/sdk/resourcemanager/automation/armautomation/activity_client.go +++ b/sdk/resourcemanager/automation/armautomation/activity_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewActivityClient(subscriptionID string, credential azcore.TokenCredential, // Get - Retrieve the activity in the module identified by module name and activity name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The name of module. // - activityName - The name of activity. // - options - ActivityClientGetOptions contains the optional parameters for the ActivityClient.Get method. func (client *ActivityClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string, options *ActivityClientGetOptions) (ActivityClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, activityName, options) if err != nil { return ActivityClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ActivityClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ActivityClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -97,7 +99,7 @@ func (client *ActivityClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +116,7 @@ func (client *ActivityClient) getHandleResponse(resp *http.Response) (ActivityCl // NewListByModulePager - Retrieve a list of activities in the module identified by module name. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The name of module. @@ -172,7 +174,7 @@ func (client *ActivityClient) listByModuleCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/activity_client_example_test.go b/sdk/resourcemanager/automation/armautomation/activity_client_example_test.go deleted file mode 100644 index 68afeafbb293..000000000000 --- a/sdk/resourcemanager/automation/armautomation/activity_client_example_test.go +++ /dev/null @@ -1,756 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getActivityInAModule.json -func ExampleActivityClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewActivityClient().Get(ctx, "rg", "myAutomationAccount33", "OmsCompositeResources", "Add-AzureRmAccount", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Activity = armautomation.Activity{ - // Name: to.Ptr("Add-AzureRmAccount"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Add-AzureRmAccount"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Add-AzureRmAcccount cmdlet adds an authenticated Azure account to use for Azure Resource Manager cmdlet requests.\n\nYou can use this authenticated account only with Azure Resource Manager cmdlets. To add an authenticated account for use with Service Management cmdlets, use the Add-AzureAccount or the Import-AzurePublishSettingsFile cmdlet."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // OutputTypes: []*armautomation.ActivityOutputType{ - // { - // Name: to.Ptr("Microsoft.Azure.Commands.Profile.Models.PSAzureProfile"), - // Type: to.Ptr("Microsoft.Azure.Commands.Profile.Models.PSAzureProfile"), - // }}, - // ParameterSets: []*armautomation.ActivityParameterSet{ - // { - // Name: to.Ptr("SubscriptionId"), - // Parameters: []*armautomation.ActivityParameter{ - // { - // Name: to.Ptr("AccessToken"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("AccountId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("ApplicationId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("CertificateThumbprint"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Credential"), - // Type: to.Ptr("System.Management.Automation.PSCredential"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Environment"), - // Type: to.Ptr("Microsoft.Azure.Common.Authentication.Models.AzureEnvironment"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("EnvironmentName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("SubscriptionId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(true), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("TenantId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }}, - // }, - // { - // Name: to.Ptr("ServicePrincipal"), - // Parameters: []*armautomation.ActivityParameter{ - // { - // Name: to.Ptr("Credential"), - // Type: to.Ptr("System.Management.Automation.PSCredential"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Environment"), - // Type: to.Ptr("Microsoft.Azure.Common.Authentication.Models.AzureEnvironment"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("EnvironmentName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("ServicePrincipal"), - // Type: to.Ptr("System.Management.Automation.SwitchParameter"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("SubscriptionId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(true), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("SubscriptionName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(true), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("TenantId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }}, - // }, - // { - // Name: to.Ptr("SubscriptionName"), - // Parameters: []*armautomation.ActivityParameter{ - // { - // Name: to.Ptr("AccessToken"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("AccountId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("ApplicationId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("CertificateThumbprint"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Credential"), - // Type: to.Ptr("System.Management.Automation.PSCredential"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Environment"), - // Type: to.Ptr("Microsoft.Azure.Common.Authentication.Models.AzureEnvironment"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("EnvironmentName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("SubscriptionName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(true), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("TenantId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }}, - // }, - // { - // Name: to.Ptr("User"), - // Parameters: []*armautomation.ActivityParameter{ - // { - // Name: to.Ptr("Credential"), - // Type: to.Ptr("System.Management.Automation.PSCredential"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Environment"), - // Type: to.Ptr("Microsoft.Azure.Common.Authentication.Models.AzureEnvironment"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("EnvironmentName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("TenantId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }}, - // }, - // { - // Name: to.Ptr("AccessToken"), - // Parameters: []*armautomation.ActivityParameter{ - // { - // Name: to.Ptr("AccessToken"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("AccountId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Environment"), - // Type: to.Ptr("Microsoft.Azure.Common.Authentication.Models.AzureEnvironment"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("EnvironmentName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("TenantId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }}, - // }, - // { - // Name: to.Ptr("ServicePrincipalCertificate"), - // Parameters: []*armautomation.ActivityParameter{ - // { - // Name: to.Ptr("ApplicationId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("CertificateThumbprint"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("Environment"), - // Type: to.Ptr("Microsoft.Azure.Common.Authentication.Models.AzureEnvironment"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("EnvironmentName"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(false), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("ServicePrincipal"), - // Type: to.Ptr("System.Management.Automation.SwitchParameter"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }, - // { - // Name: to.Ptr("TenantId"), - // Type: to.Ptr("System.String"), - // Description: to.Ptr("Specify the feature description"), - // IsDynamic: to.Ptr(false), - // IsMandatory: to.Ptr(true), - // Position: to.Ptr[int64](-2147483648), - // ValidationSet: []*armautomation.ActivityParameterValidationSet{ - // }, - // ValueFromPipeline: to.Ptr(false), - // ValueFromPipelineByPropertyName: to.Ptr(false), - // ValueFromRemainingArguments: to.Ptr(false), - // }}, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listActivitiesByModule.json -func ExampleActivityClient_NewListByModulePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewActivityClient().NewListByModulePager("rg", "myAutomationAccount33", "OmsCompositeResources", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ActivityListResult = armautomation.ActivityListResult{ - // Value: []*armautomation.Activity{ - // { - // Name: to.Ptr("Add-AzureRmAccount"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Add-AzureRmAccount"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Add-AzureRmAcccount cmdlet adds an authenticated Azure account to use for Azure Resource Manager cmdlet requests.\n\nYou can use this authenticated account only with Azure Resource Manager cmdlets. To add an authenticated account for use with Service Management cmdlets, use the Add-AzureAccount or the Import-AzurePublishSettingsFile cmdlet."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Add-AzureRmEnvironment"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Add-AzureRmEnvironment"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Add-AzureRmEnvironment cmdlet adds endpoints and metadata to enable Azure Resource Manager cmdlets to connect with a new instance of Azure Resource Manager. The built-in environments AzureCloud and AzureChinaCloud target existing public instances of Azure Resource Manager."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Disable-AzureRmDataCollection"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Disable-AzureRmDataCollection"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr(""), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.713+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.713+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Enable-AzureRmDataCollection"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Enable-AzureRmDataCollection"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr(""), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.713+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.713+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Get-AzureRmContext"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Get-AzureRmContext"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Get-AzureRmContext cmdlet gets the current metadata used to authenticate Azure Resource Manager requests.\n\nThis cmdlet gets the Active Directory account, Active Directory tenant, Azure subscription, and the targeted Azure environment. Azure Resource Manager cmdlets use these settings by default when making Azure Resource Manager requests."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.713+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.713+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Get-AzureRmEnvironment"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Get-AzureRmEnvironment"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Get-AzureRmEnvironment cmdlet gets endpoints and metadata for an instance of Azure services."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Get-AzureRmSubscription"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Get-AzureRmSubscription"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Get-AzureRmSubscription cmdlet gets the subscription ID, subscription name, and home tenant for subscriptions that the current account can access."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Get-AzureRmTenant"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Get-AzureRmTenant"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Get-AzureRmTenant cmdlet gets tenants authorized for the current user."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Remove-AzureRmEnvironment"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Remove-AzureRmEnvironment"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Remove-AzureRmEnvironment cmdlet removes endpoints and metadata information for connecting to a given Azure instance."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Save-AzureRmProfile"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Save-AzureRmProfile"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Save-AzureRmProfile cmdlet saves the current authentication information for use in other PowerShell sessions."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Select-AzureRmProfile"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Select-AzureRmProfile"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Select-AzureRmProfile cmdlet loads authentication information from a file to set the Azure environment and context. Cmdlets that you run in the current session use this information to authenticate requests to Azure Resource Manager."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Set-AzureRmContext"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Set-AzureRmContext"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Set-AzureRmContext cmdlet sets authentication information for cmdlets that you run in the current session. The context includes tenant, subscription, and environment information."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("Set-AzureRmEnvironment"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile/activities/Set-AzureRmEnvironment"), - // Properties: &armautomation.ActivityProperties{ - // Description: to.Ptr("The Set-AzureRMEnvironment cmdlet sets endpoints and metadata for connecting to an instance of Azure."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // Definition: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:21.697+00:00"); return t}()), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go b/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go index 784c919a1ae5..69d75c925f23 100644 --- a/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go +++ b/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -54,18 +53,21 @@ func NewAgentRegistrationInformationClient(subscriptionID string, credential azc // - options - AgentRegistrationInformationClientGetOptions contains the optional parameters for the AgentRegistrationInformationClient.Get // method. func (client *AgentRegistrationInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, options *AgentRegistrationInformationClientGetOptions) (AgentRegistrationInformationClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return AgentRegistrationInformationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AgentRegistrationInformationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentRegistrationInformationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentRegistrationInformationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -113,18 +115,21 @@ func (client *AgentRegistrationInformationClient) getHandleResponse(resp *http.R // - options - AgentRegistrationInformationClientRegenerateKeyOptions contains the optional parameters for the AgentRegistrationInformationClient.RegenerateKey // method. func (client *AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter, options *AgentRegistrationInformationClientRegenerateKeyOptions) (AgentRegistrationInformationClientRegenerateKeyResponse, error) { + var err error req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, automationAccountName, parameters, options) if err != nil { return AgentRegistrationInformationClientRegenerateKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AgentRegistrationInformationClientRegenerateKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentRegistrationInformationClientRegenerateKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentRegistrationInformationClientRegenerateKeyResponse{}, err } - return client.regenerateKeyHandleResponse(resp) + resp, err := client.regenerateKeyHandleResponse(httpResp) + return resp, err } // regenerateKeyCreateRequest creates the RegenerateKey request. @@ -150,7 +155,10 @@ func (client *AgentRegistrationInformationClient) regenerateKeyCreateRequest(ctx reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // regenerateKeyHandleResponse handles the RegenerateKey response. diff --git a/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client_example_test.go b/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client_example_test.go deleted file mode 100644 index 2765a553259a..000000000000 --- a/sdk/resourcemanager/automation/armautomation/agentregistrationinformation_client_example_test.go +++ /dev/null @@ -1,77 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getAgentRegistration.json -func ExampleAgentRegistrationInformationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAgentRegistrationInformationClient().Get(ctx, "rg", "myAutomationAccount18", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AgentRegistration = armautomation.AgentRegistration{ - // DscMetaConfiguration: to.Ptr("\r\n instance of MSFT_WebDownloadManager as $MSFT_WebDownloadManager1ref\r\n {\r\n ResourceID = \"[ConfigurationRepositoryWeb]AzureAutomationDSC\";\r\n SourceInfo = \"C:\\\\OaaS-RegistrationMetaConfig2.ps1::20::9::ConfigurationRepositoryWeb\";\r\n RegistrationKey = \"5ci0000000000000000000000000000000000000000000000000000000000000000000000000000Y5H/8wFg==\"; \r\n ServerURL = \"https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6\";\r\n };\r\n\r\n instance of MSFT_WebResourceManager as $MSFT_WebResourceManager1ref\r\n {\r\n SourceInfo = \"C:\\\\OaaS-RegistrationMetaConfig2.ps1::27::9::ResourceRepositoryWeb\";\r\n ServerURL = \"https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6\";\r\n ResourceID = \"[ResourceRepositoryWeb]AzureAutomationDSC\";\r\n RegistrationKey = \"5ci0000000000000000000000000000000000000000000000000000000000000000000000000000Y5H/8wFg==\"; \r\n };\r\n\r\n instance of MSFT_WebReportManager as $MSFT_WebReportManager1ref\r\n {\r\n SourceInfo = \"C:\\\\OaaS-RegistrationMetaConfig2.ps1::34::9::ReportServerWeb\";\r\n ServerURL = \"https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6\";\r\n ResourceID = \"[ReportServerWeb]AzureAutomationDSC\";\r\n RegistrationKey = \"5ci0000000000000000000000000000000000000000000000000000000000000000000000000000Y5H/8wFg==\"; \r\n };\r\n\r\n instance of MSFT_DSCMetaConfiguration as $MSFT_DSCMetaConfiguration1ref\r\n {\r\n RefreshMode = \"Pull\";\r\n AllowModuleOverwrite = False;\r\n ActionAfterReboot = \"ContinueConfiguration\";\r\n RefreshFrequencyMins = 30;\r\n RebootNodeIfNeeded = False;\r\n ConfigurationModeFrequencyMins = 15;\r\n ConfigurationMode = \"ApplyAndMonitor\";\r\n\r\n ResourceModuleManagers = {\r\n $MSFT_WebResourceManager1ref \r\n };\r\n ReportManagers = {\r\n $MSFT_WebReportManager1ref \r\n };\r\n ConfigurationDownloadManagers = {\r\n $MSFT_WebDownloadManager1ref \r\n };\r\n };\r\n\r\n instance of OMI_ConfigurationDocument\r\n {\r\n Version=\"2.0.0\";\r\n MinimumCompatibleVersion = \"2.0.0\";\r\n CompatibleVersionAdditionalProperties= { \"MSFT_DSCMetaConfiguration:StatusRetentionTimeInDays\" };\r\n Author=\"azureautomation\";\r\n GenerationDate=\"04/17/2015 11:41:09\";\r\n GenerationHost=\"azureautomation-01\";\r\n Name=\"RegistrationMetaConfig\";\r\n };\r\n "), - // Endpoint: to.Ptr("https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/agentRegistrationInformation/https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6"), - // Keys: &armautomation.AgentRegistrationKeys{ - // Primary: to.Ptr("5ci0000000000000000000000000000000000000000000000000000000000000000000000000000Y5H/8wFg=="), - // Secondary: to.Ptr("rVp0000000000000000000000000000000000000000000000000000000000000000000000000000f8cbmrOA=="), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/regenerateAgentRegistrationKey.json -func ExampleAgentRegistrationInformationClient_RegenerateKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAgentRegistrationInformationClient().RegenerateKey(ctx, "rg", "myAutomationAccount18", armautomation.AgentRegistrationRegenerateKeyParameter{ - KeyName: to.Ptr(armautomation.AgentRegistrationKeyNamePrimary), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AgentRegistration = armautomation.AgentRegistration{ - // Endpoint: to.Ptr("https://eus2-agentservice-prod-1.azure-automation.net/accounts/bd8fac9e-0000-0000-0000-0000f474fbf6"), - // Keys: &armautomation.AgentRegistrationKeys{ - // Primary: to.Ptr("5ci0000000000000000000000000000000000000000000000000000000000000000000000000000Y5H/8wFg=="), - // Secondary: to.Ptr("rVp0000000000000000000000000000000000000000000000000000000000000000000000000000f8cbmrOA=="), - // }, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/autorest.md b/sdk/resourcemanager/automation/armautomation/autorest.md index 0fd3c9d72bb9..da4dac5be478 100644 --- a/sdk/resourcemanager/automation/armautomation/autorest.md +++ b/sdk/resourcemanager/automation/armautomation/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/432872fac1d0f8edcae98a0e8504afc0ee302710/specification/automation/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/432872fac1d0f8edcae98a0e8504afc0ee302710/specification/automation/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/automation/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/automation/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.8.1 +module-version: 0.9.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/automation/armautomation/certificate_client.go b/sdk/resourcemanager/automation/armautomation/certificate_client.go index a9b2e72bf9ec..2f4996e9688f 100644 --- a/sdk/resourcemanager/automation/armautomation/certificate_client.go +++ b/sdk/resourcemanager/automation/armautomation/certificate_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewCertificateClient(subscriptionID string, credential azcore.TokenCredenti // CreateOrUpdate - Create a certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - certificateName - The parameters supplied to the create or update certificate operation. @@ -56,18 +55,21 @@ func NewCertificateClient(subscriptionID string, credential azcore.TokenCredenti // - options - CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate // method. func (client *CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters, options *CertificateClientCreateOrUpdateOptions) (CertificateClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, certificateName, parameters, options) if err != nil { return CertificateClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CertificateClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CertificateClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *CertificateClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,22 +117,24 @@ func (client *CertificateClient) createOrUpdateHandleResponse(resp *http.Respons // Delete - Delete the certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - certificateName - The name of certificate. // - options - CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. func (client *CertificateClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, options *CertificateClientDeleteOptions) (CertificateClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, certificateName, options) if err != nil { return CertificateClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientDeleteResponse{}, err } return CertificateClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,24 +172,27 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour // Get - Retrieve the certificate identified by certificate name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - certificateName - The name of certificate. // - options - CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. func (client *CertificateClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, options *CertificateClientGetOptions) (CertificateClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, certificateName, options) if err != nil { return CertificateClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -209,7 +219,7 @@ func (client *CertificateClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,7 +236,7 @@ func (client *CertificateClient) getHandleResponse(resp *http.Response) (Certifi // NewListByAutomationAccountPager - Retrieve a list of certificates. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - CertificateClientListByAutomationAccountOptions contains the optional parameters for the CertificateClient.NewListByAutomationAccountPager @@ -279,7 +289,7 @@ func (client *CertificateClient) listByAutomationAccountCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,25 +307,28 @@ func (client *CertificateClient) listByAutomationAccountHandleResponse(resp *htt // Update - Update a certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - certificateName - The parameters supplied to the update certificate operation. // - parameters - The parameters supplied to the update certificate operation. // - options - CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method. func (client *CertificateClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters, options *CertificateClientUpdateOptions) (CertificateClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, certificateName, parameters, options) if err != nil { return CertificateClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -342,10 +355,13 @@ func (client *CertificateClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/certificate_client_example_test.go b/sdk/resourcemanager/automation/armautomation/certificate_client_example_test.go deleted file mode 100644 index 09f42cbd9941..000000000000 --- a/sdk/resourcemanager/automation/armautomation/certificate_client_example_test.go +++ /dev/null @@ -1,185 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteCertificate.json -func ExampleCertificateClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateClient().Delete(ctx, "rg", "myAutomationAccount33", "testCert", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCertificate.json -func ExampleCertificateClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateClient().Get(ctx, "rg", "myAutomationAccount33", "testCert", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Certificate = armautomation.Certificate{ - // Name: to.Ptr("testCert"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/certificates/testCert"), - // Properties: &armautomation.CertificateProperties{ - // Description: to.Ptr("Sample Cert"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:26:43.337+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T17:25:45+00:00"); return t}()), - // IsExportable: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:28:55.01+00:00"); return t}()), - // Thumbprint: to.Ptr("thumbprint of cert"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateCertificate.json -func ExampleCertificateClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount18", "testCert", armautomation.CertificateCreateOrUpdateParameters{ - Name: to.Ptr("testCert"), - Properties: &armautomation.CertificateCreateOrUpdateProperties{ - Description: to.Ptr("Sample Cert"), - Base64Value: to.Ptr("base 64 value of cert"), - IsExportable: to.Ptr(false), - Thumbprint: to.Ptr("thumbprint of cert"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Certificate = armautomation.Certificate{ - // Name: to.Ptr("testCert"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/certificates/testCert"), - // Properties: &armautomation.CertificateProperties{ - // Description: to.Ptr("sample certificate. Description updated"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:26:43.337+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T17:25:45+00:00"); return t}()), - // IsExportable: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:28:55.01+00:00"); return t}()), - // Thumbprint: to.Ptr("thumbprint of cert"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateCertificate.json -func ExampleCertificateClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateClient().Update(ctx, "rg", "myAutomationAccount33", "testCert", armautomation.CertificateUpdateParameters{ - Name: to.Ptr("testCert"), - Properties: &armautomation.CertificateUpdateProperties{ - Description: to.Ptr("sample certificate. Description updated"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Certificate = armautomation.Certificate{ - // Name: to.Ptr("testCert"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/certificates/testCert"), - // Properties: &armautomation.CertificateProperties{ - // Description: to.Ptr("sample certificate. Description updated"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:26:43.337+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T17:25:45+00:00"); return t}()), - // IsExportable: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:28:55.01+00:00"); return t}()), - // Thumbprint: to.Ptr("thumbprint of cert"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCertificatesByAutomationAccount.json -func ExampleCertificateClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateListResult = armautomation.CertificateListResult{ - // Value: []*armautomation.Certificate{ - // { - // Name: to.Ptr("testCert"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/certificates/testCert"), - // Properties: &armautomation.CertificateProperties{ - // Description: to.Ptr("Sample Cert"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:26:43.337+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T17:25:45+00:00"); return t}()), - // IsExportable: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T17:28:55.01+00:00"); return t}()), - // Thumbprint: to.Ptr("thumbprint of cert"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/client.go b/sdk/resourcemanager/automation/armautomation/client.go index 2bf4b60333ca..92c6ccd136db 100644 --- a/sdk/resourcemanager/automation/armautomation/client.go +++ b/sdk/resourcemanager/automation/armautomation/client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // ConvertGraphRunbookContent - Post operation to serialize or deserialize GraphRunbookContent // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - parameters - Input data describing the graphical runbook. // - options - ClientConvertGraphRunbookContentOptions contains the optional parameters for the Client.ConvertGraphRunbookContent // method. func (client *Client) ConvertGraphRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, parameters GraphicalRunbookContent, options *ClientConvertGraphRunbookContentOptions) (ClientConvertGraphRunbookContentResponse, error) { + var err error req, err := client.convertGraphRunbookContentCreateRequest(ctx, resourceGroupName, automationAccountName, parameters, options) if err != nil { return ClientConvertGraphRunbookContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientConvertGraphRunbookContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientConvertGraphRunbookContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientConvertGraphRunbookContentResponse{}, err } - return client.convertGraphRunbookContentHandleResponse(resp) + resp, err := client.convertGraphRunbookContentHandleResponse(httpResp) + return resp, err } // convertGraphRunbookContentCreateRequest creates the ConvertGraphRunbookContent request. @@ -89,10 +91,13 @@ func (client *Client) convertGraphRunbookContentCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // convertGraphRunbookContentHandleResponse handles the ConvertGraphRunbookContent response. diff --git a/sdk/resourcemanager/automation/armautomation/client_example_test.go b/sdk/resourcemanager/automation/armautomation/client_example_test.go deleted file mode 100644 index e3babe676a83..000000000000 --- a/sdk/resourcemanager/automation/armautomation/client_example_test.go +++ /dev/null @@ -1,83 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/serializeGraphRunbookContent.json -func ExampleClient_ConvertGraphRunbookContent_getGraphicalRawRunbookContentFromGraphicalRunbookJsonObject() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().ConvertGraphRunbookContent(ctx, "rg", "MyAutomationAccount", armautomation.GraphicalRunbookContent{ - GraphRunbookJSON: to.Ptr(""), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GraphicalRunbookContent = armautomation.GraphicalRunbookContent{ - // GraphRunbookJSON: to.Ptr(""), - // RawContent: &armautomation.RawGraphicalRunbookContent{ - // RunbookDefinition: to.Ptr("AAEAAADAQAAAAAAAAAMAgAAAGJPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLCBWZXJzaW9uPTcuMy4wLjAsIEN1bHR...."), - // RunbookType: to.Ptr(armautomation.GraphRunbookTypeGraphPowerShell), - // SchemaVersion: to.Ptr("1.10"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/deserializeGraphRunbookContent.json -func ExampleClient_ConvertGraphRunbookContent_getGraphicalRunbookContentFromRawContent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().ConvertGraphRunbookContent(ctx, "rg", "MyAutomationAccount", armautomation.GraphicalRunbookContent{ - RawContent: &armautomation.RawGraphicalRunbookContent{ - RunbookDefinition: to.Ptr("AAEAAADAQAAAAAAAAAMAgAAAGJPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLCBWZXJzaW9uPTcuMy4wLjAsIEN1bHR...."), - RunbookType: to.Ptr(armautomation.GraphRunbookTypeGraphPowerShell), - SchemaVersion: to.Ptr("1.10"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GraphicalRunbookContent = armautomation.GraphicalRunbookContent{ - // GraphRunbookJSON: to.Ptr(""), - // RawContent: &armautomation.RawGraphicalRunbookContent{ - // RunbookDefinition: to.Ptr("AAEAAADAQAAAAAAAAAMAgAAAGJPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLCBWZXJzaW9uPTcuMy4wLjAsIEN1bHR...."), - // RunbookType: to.Ptr(armautomation.GraphRunbookTypeGraphPowerShell), - // SchemaVersion: to.Ptr("1.10"), - // }, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/client_factory.go b/sdk/resourcemanager/automation/armautomation/client_factory.go index 813200a2a863..99b7c8e4ee0e 100644 --- a/sdk/resourcemanager/automation/armautomation/client_factory.go +++ b/sdk/resourcemanager/automation/armautomation/client_factory.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -39,18 +38,13 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewAccountClient() *AccountClient { + subClient, _ := NewAccountClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPython2PackageClient() *Python2PackageClient { - subClient, _ := NewPython2PackageClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewActivityClient() *ActivityClient { + subClient, _ := NewActivityClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -59,93 +53,93 @@ func (c *ClientFactory) NewAgentRegistrationInformationClient() *AgentRegistrati return subClient } -func (c *ClientFactory) NewDscNodeClient() *DscNodeClient { - subClient, _ := NewDscNodeClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewCertificateClient() *CertificateClient { + subClient, _ := NewCertificateClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNodeReportsClient() *NodeReportsClient { - subClient, _ := NewNodeReportsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewClient() *Client { + subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscNodeConfigurationClient() *DscNodeConfigurationClient { - subClient, _ := NewDscNodeConfigurationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewConnectionClient() *ConnectionClient { + subClient, _ := NewConnectionClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscCompilationJobClient() *DscCompilationJobClient { - subClient, _ := NewDscCompilationJobClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewConnectionTypeClient() *ConnectionTypeClient { + subClient, _ := NewConnectionTypeClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscCompilationJobStreamClient() *DscCompilationJobStreamClient { - subClient, _ := NewDscCompilationJobStreamClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewCredentialClient() *CredentialClient { + subClient, _ := NewCredentialClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNodeCountInformationClient() *NodeCountInformationClient { - subClient, _ := NewNodeCountInformationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDeletedAutomationAccountsClient() *DeletedAutomationAccountsClient { + subClient, _ := NewDeletedAutomationAccountsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSourceControlClient() *SourceControlClient { - subClient, _ := NewSourceControlClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDscCompilationJobClient() *DscCompilationJobClient { + subClient, _ := NewDscCompilationJobClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSourceControlSyncJobClient() *SourceControlSyncJobClient { - subClient, _ := NewSourceControlSyncJobClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDscCompilationJobStreamClient() *DscCompilationJobStreamClient { + subClient, _ := NewDscCompilationJobStreamClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSourceControlSyncJobStreamsClient() *SourceControlSyncJobStreamsClient { - subClient, _ := NewSourceControlSyncJobStreamsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDscConfigurationClient() *DscConfigurationClient { + subClient, _ := NewDscConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAccountClient() *AccountClient { - subClient, _ := NewAccountClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDscNodeClient() *DscNodeClient { + subClient, _ := NewDscNodeClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewStatisticsClient() *StatisticsClient { - subClient, _ := NewStatisticsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDscNodeConfigurationClient() *DscNodeConfigurationClient { + subClient, _ := NewDscNodeConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFieldsClient() *FieldsClient { + subClient, _ := NewFieldsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewKeysClient() *KeysClient { - subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewHybridRunbookWorkerGroupClient() *HybridRunbookWorkerGroupClient { + subClient, _ := NewHybridRunbookWorkerGroupClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificateClient() *CertificateClient { - subClient, _ := NewCertificateClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewHybridRunbookWorkersClient() *HybridRunbookWorkersClient { + subClient, _ := NewHybridRunbookWorkersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewConnectionClient() *ConnectionClient { - subClient, _ := NewConnectionClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewJobClient() *JobClient { + subClient, _ := NewJobClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewConnectionTypeClient() *ConnectionTypeClient { - subClient, _ := NewConnectionTypeClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewJobScheduleClient() *JobScheduleClient { + subClient, _ := NewJobScheduleClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewCredentialClient() *CredentialClient { - subClient, _ := NewCredentialClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewJobStreamClient() *JobStreamClient { + subClient, _ := NewJobStreamClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobScheduleClient() *JobScheduleClient { - subClient, _ := NewJobScheduleClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewKeysClient() *KeysClient { + subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -154,13 +148,18 @@ func (c *ClientFactory) NewLinkedWorkspaceClient() *LinkedWorkspaceClient { return subClient } -func (c *ClientFactory) NewActivityClient() *ActivityClient { - subClient, _ := NewActivityClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewModuleClient() *ModuleClient { + subClient, _ := NewModuleClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewModuleClient() *ModuleClient { - subClient, _ := NewModuleClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewNodeCountInformationClient() *NodeCountInformationClient { + subClient, _ := NewNodeCountInformationClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewNodeReportsClient() *NodeReportsClient { + subClient, _ := NewNodeReportsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -169,53 +168,53 @@ func (c *ClientFactory) NewObjectDataTypesClient() *ObjectDataTypesClient { return subClient } -func (c *ClientFactory) NewFieldsClient() *FieldsClient { - subClient, _ := NewFieldsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewScheduleClient() *ScheduleClient { - subClient, _ := NewScheduleClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPowerShell72ModuleClient() *PowerShell72ModuleClient { + subClient, _ := NewPowerShell72ModuleClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVariableClient() *VariableClient { - subClient, _ := NewVariableClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWatcherClient() *WatcherClient { - subClient, _ := NewWatcherClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDscConfigurationClient() *DscConfigurationClient { - subClient, _ := NewDscConfigurationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPython2PackageClient() *Python2PackageClient { + subClient, _ := NewPython2PackageClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobClient() *JobClient { - subClient, _ := NewJobClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPython3PackageClient() *Python3PackageClient { + subClient, _ := NewPython3PackageClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewJobStreamClient() *JobStreamClient { - subClient, _ := NewJobStreamClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewRunbookClient() *RunbookClient { + subClient, _ := NewRunbookClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewRunbookDraftClient() *RunbookDraftClient { + subClient, _ := NewRunbookDraftClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewClient() *Client { - subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewScheduleClient() *ScheduleClient { + subClient, _ := NewScheduleClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSoftwareUpdateConfigurationsClient() *SoftwareUpdateConfigurationsClient { - subClient, _ := NewSoftwareUpdateConfigurationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSoftwareUpdateConfigurationMachineRunsClient() *SoftwareUpdateConfigurationMachineRunsClient { + subClient, _ := NewSoftwareUpdateConfigurationMachineRunsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -224,23 +223,28 @@ func (c *ClientFactory) NewSoftwareUpdateConfigurationRunsClient() *SoftwareUpda return subClient } -func (c *ClientFactory) NewSoftwareUpdateConfigurationMachineRunsClient() *SoftwareUpdateConfigurationMachineRunsClient { - subClient, _ := NewSoftwareUpdateConfigurationMachineRunsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSoftwareUpdateConfigurationsClient() *SoftwareUpdateConfigurationsClient { + subClient, _ := NewSoftwareUpdateConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRunbookDraftClient() *RunbookDraftClient { - subClient, _ := NewRunbookDraftClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSourceControlClient() *SourceControlClient { + subClient, _ := NewSourceControlClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRunbookClient() *RunbookClient { - subClient, _ := NewRunbookClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSourceControlSyncJobClient() *SourceControlSyncJobClient { + subClient, _ := NewSourceControlSyncJobClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewTestJobStreamsClient() *TestJobStreamsClient { - subClient, _ := NewTestJobStreamsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSourceControlSyncJobStreamsClient() *SourceControlSyncJobStreamsClient { + subClient, _ := NewSourceControlSyncJobStreamsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewStatisticsClient() *StatisticsClient { + subClient, _ := NewStatisticsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -249,22 +253,27 @@ func (c *ClientFactory) NewTestJobClient() *TestJobClient { return subClient } -func (c *ClientFactory) NewWebhookClient() *WebhookClient { - subClient, _ := NewWebhookClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewTestJobStreamsClient() *TestJobStreamsClient { + subClient, _ := NewTestJobStreamsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewHybridRunbookWorkersClient() *HybridRunbookWorkersClient { - subClient, _ := NewHybridRunbookWorkersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDeletedAutomationAccountsClient() *DeletedAutomationAccountsClient { - subClient, _ := NewDeletedAutomationAccountsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVariableClient() *VariableClient { + subClient, _ := NewVariableClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewHybridRunbookWorkerGroupClient() *HybridRunbookWorkerGroupClient { - subClient, _ := NewHybridRunbookWorkerGroupClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewWatcherClient() *WatcherClient { + subClient, _ := NewWatcherClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewWebhookClient() *WebhookClient { + subClient, _ := NewWebhookClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/sdk/resourcemanager/automation/armautomation/connection_client.go b/sdk/resourcemanager/automation/armautomation/connection_client.go index a25fe5e48166..ee93266398ea 100644 --- a/sdk/resourcemanager/automation/armautomation/connection_client.go +++ b/sdk/resourcemanager/automation/armautomation/connection_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewConnectionClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Create or update a connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - connectionName - The parameters supplied to the create or update connection operation. @@ -56,18 +55,21 @@ func NewConnectionClient(subscriptionID string, credential azcore.TokenCredentia // - options - ConnectionClientCreateOrUpdateOptions contains the optional parameters for the ConnectionClient.CreateOrUpdate // method. func (client *ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters, options *ConnectionClientCreateOrUpdateOptions) (ConnectionClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, connectionName, parameters, options) if err != nil { return ConnectionClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ConnectionClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *ConnectionClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,22 +117,24 @@ func (client *ConnectionClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Delete the connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - connectionName - The name of connection. // - options - ConnectionClientDeleteOptions contains the optional parameters for the ConnectionClient.Delete method. func (client *ConnectionClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, options *ConnectionClientDeleteOptions) (ConnectionClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, connectionName, options) if err != nil { return ConnectionClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectionClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientDeleteResponse{}, err } return ConnectionClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *ConnectionClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,24 +172,27 @@ func (client *ConnectionClient) deleteCreateRequest(ctx context.Context, resourc // Get - Retrieve the connection identified by connection name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - connectionName - The name of connection. // - options - ConnectionClientGetOptions contains the optional parameters for the ConnectionClient.Get method. func (client *ConnectionClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, options *ConnectionClientGetOptions) (ConnectionClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, connectionName, options) if err != nil { return ConnectionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -209,7 +219,7 @@ func (client *ConnectionClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,7 +236,7 @@ func (client *ConnectionClient) getHandleResponse(resp *http.Response) (Connecti // NewListByAutomationAccountPager - Retrieve a list of connections. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - ConnectionClientListByAutomationAccountOptions contains the optional parameters for the ConnectionClient.NewListByAutomationAccountPager @@ -279,7 +289,7 @@ func (client *ConnectionClient) listByAutomationAccountCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,25 +307,28 @@ func (client *ConnectionClient) listByAutomationAccountHandleResponse(resp *http // Update - Update a connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - connectionName - The parameters supplied to the update a connection operation. // - parameters - The parameters supplied to the update a connection operation. // - options - ConnectionClientUpdateOptions contains the optional parameters for the ConnectionClient.Update method. func (client *ConnectionClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters, options *ConnectionClientUpdateOptions) (ConnectionClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, connectionName, parameters, options) if err != nil { return ConnectionClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -342,10 +355,13 @@ func (client *ConnectionClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/connection_client_example_test.go b/sdk/resourcemanager/automation/armautomation/connection_client_example_test.go deleted file mode 100644 index 0cac291dc79a..000000000000 --- a/sdk/resourcemanager/automation/armautomation/connection_client_example_test.go +++ /dev/null @@ -1,2167 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteConnection.json -func ExampleConnectionClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewConnectionClient().Delete(ctx, "rg", "myAutomationAccount28", "myConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnection.json -func ExampleConnectionClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectionClient().Get(ctx, "rg", "myAutomationAccount28", "myConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Connection = armautomation.Connection{ - // Name: to.Ptr("myConnection"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection"), - // Properties: &armautomation.ConnectionProperties{ - // Description: to.Ptr("my description goes here"), - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:29.29+00:00"); return t}()), - // FieldDefinitionValues: map[string]*string{ - // "AutomationCertificateName": to.Ptr("myCertificateName"), - // "SubscriptionID": to.Ptr("b5e4748c-f69a-467c-8749-e2f9c8cd3007"), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:33.617+00:00"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateConnection.json -func ExampleConnectionClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectionClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount28", "mysConnection", armautomation.ConnectionCreateOrUpdateParameters{ - Name: to.Ptr("mysConnection"), - Properties: &armautomation.ConnectionCreateOrUpdateProperties{ - Description: to.Ptr("my description goes here"), - ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - Name: to.Ptr("Azure"), - }, - FieldDefinitionValues: map[string]*string{ - "AutomationCertificateName": to.Ptr("mysCertificateName"), - "SubscriptionID": to.Ptr("subid"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Connection = armautomation.Connection{ - // Name: to.Ptr("mysConnection"), - // Properties: &armautomation.ConnectionProperties{ - // Description: to.Ptr("my description goes here"), - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:29.29+00:00"); return t}()), - // FieldDefinitionValues: map[string]*string{ - // "AutomationCertificateName": to.Ptr("mysCertificateName"), - // "SubscriptionID": to.Ptr("subid"), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:29.29+00:00"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateConnection.json -func ExampleConnectionClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectionClient().Update(ctx, "rg", "myAutomationAccount28", "myConnection", armautomation.ConnectionUpdateParameters{ - Name: to.Ptr("myConnection"), - Properties: &armautomation.ConnectionUpdateProperties{ - Description: to.Ptr("my description goes here"), - FieldDefinitionValues: map[string]*string{ - "AutomationCertificateName": to.Ptr("myCertificateName"), - "SubscriptionID": to.Ptr("b5e4748c-f69a-467c-8749-e2f9c8cd3009"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Connection = armautomation.Connection{ - // Name: to.Ptr("myConnection"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount29/connections/myConnection"), - // Properties: &armautomation.ConnectionProperties{ - // Description: to.Ptr("my description goes here"), - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T08:21:29.313+00:00"); return t}()), - // FieldDefinitionValues: map[string]*string{ - // "AutomationCertificateName": to.Ptr("myCertificateName"), - // "SubscriptionID": to.Ptr("b5e4748c-f69a-467c-8749-e2f9c8cd3009"), - // }, - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T08:21:30.093+00:00"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listConnectionsByAutomationAccount_First100.json -func ExampleConnectionClient_NewListByAutomationAccountPager_listConnectionsByAutomationAccountFirst100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectionClient().NewListByAutomationAccountPager("rg", "myAutomationAccount28", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ConnectionListResult = armautomation.ConnectionListResult{ - // Value: []*armautomation.Connection{ - // { - // Name: to.Ptr("myConnection"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:29.29+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:33.617+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection0"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection0"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:36.493+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:36.493+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection1"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection1"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:36.76+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:36.76+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection10"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection10"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.117+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.117+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection100"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection100"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.527+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.527+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection101"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection101"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.777+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.777+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection102"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection102"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.027+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.027+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection103"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection103"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.277+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.277+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection104"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection104"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.527+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.527+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection105"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection105"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.82+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:05.82+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection106"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection106"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.07+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.07+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection107"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection107"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.37+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection108"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection108"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.62+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection109"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection109"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.87+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:06.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection11"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection11"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.367+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.367+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection110"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection110"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.167+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection111"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection111"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.463+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.463+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection112"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection112"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.73+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.73+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection113"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection113"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.963+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:07.963+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection114"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection114"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:08.213+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:08.213+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection115"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection115"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:08.527+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:08.527+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection116"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection116"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:08.76+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:08.76+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection117"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection117"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.103+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.103+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection118"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection118"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.37+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection119"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection119"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.65+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.65+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection12"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection12"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.617+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.617+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection120"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection120"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.883+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:09.883+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection121"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection121"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.167+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection122"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection122"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.43+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection123"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection123"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.68+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.68+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection124"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection124"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.93+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:10.93+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection125"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection125"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.18+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.18+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection126"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection126"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.43+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection127"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection127"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.667+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.667+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection128"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection128"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.917+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:11.917+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection129"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection129"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.18+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.18+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection13"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection13"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.883+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:39.883+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection130"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection130"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.43+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection131"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection131"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.667+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.667+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection132"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection132"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.917+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:12.917+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection133"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection133"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:13.213+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:13.213+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection134"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection134"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:13.463+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:13.463+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection135"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection135"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:13.73+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:13.73+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection136"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection136"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.01+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.01+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection137"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection137"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.29+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.29+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection138"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection138"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.54+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.54+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection139"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection139"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.807+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:14.807+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection14"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection14"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.133+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.133+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection140"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection140"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.057+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.057+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection141"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection141"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.307+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.307+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection142"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection142"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.603+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.603+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection143"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection143"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.853+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:15.853+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection144"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection144"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.12+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.12+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection145"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection145"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.37+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection146"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection146"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.633+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.633+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection147"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection147"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.9+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:16.9+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection148"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection148"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.167+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection149"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection149"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.43+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection15"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection15"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.37+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection150"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection150"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.68+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.68+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection151"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection151"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.963+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:17.963+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection152"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection152"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:18.527+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:18.527+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection153"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection153"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:18.79+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:18.79+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection154"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection154"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.073+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.073+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection155"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection155"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.353+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection156"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection156"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.68+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.68+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection157"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection157"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.93+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:19.93+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection158"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection158"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:20.243+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:20.243+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection159"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection159"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:20.557+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:20.557+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection16"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection16"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.62+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection160"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection160"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:20.823+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:20.823+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection161"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection161"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.15+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.15+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection162"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection162"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.417+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.417+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection163"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection163"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.65+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.65+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection164"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection164"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.993+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:21.993+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection165"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection165"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:22.323+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:22.323+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection166"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection166"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:22.68+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:22.68+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection167"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection167"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.057+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.057+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection168"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection168"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.417+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.417+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection169"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection169"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.697+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection17"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection17"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.87+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:40.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection170"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection170"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.963+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:23.963+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection171"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection171"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:24.243+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:24.243+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection172"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection172"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:24.51+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:24.51+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection173"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection173"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:24.777+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:24.777+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection174"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection174"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:25.057+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:25.057+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection175"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection175"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:25.34+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:25.34+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection18"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection18"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:41.197+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:41.197+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection19"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection19"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:41.57+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:41.57+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection2"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection2"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.01+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.01+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection20"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection20"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:41.913+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:41.913+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection21"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection21"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:42.273+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:42.273+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection22"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection22"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:42.663+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:42.663+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection23"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection23"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:42.993+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:42.993+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection24"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection24"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:43.26+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:43.26+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection25"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection25"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:43.587+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:43.587+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection26"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection26"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:43.87+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:43.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection27"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection27"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:44.227+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:44.227+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection28"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection28"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:44.557+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:44.557+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection29"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection29"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:44.807+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:44.807+00:00"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listConnectionsByAutomationAccount_Next100.json -func ExampleConnectionClient_NewListByAutomationAccountPager_listConnectionsByAutomationAccountNext100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectionClient().NewListByAutomationAccountPager("rg", "myAutomationAccount28", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ConnectionListResult = armautomation.ConnectionListResult{ - // Value: []*armautomation.Connection{ - // { - // Name: to.Ptr("myConnection3"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection3"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.29+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.29+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection30"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection30"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.04+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.04+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection31"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection31"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.307+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.307+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection32"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection32"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.557+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.557+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection33"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection33"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.853+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:45.853+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection34"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection34"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.087+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.087+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection35"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection35"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.353+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection36"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection36"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.603+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.603+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection37"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection37"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.853+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:46.853+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection38"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection38"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.103+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.103+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection39"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection39"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.353+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection4"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection4"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.54+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.54+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection40"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection40"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.62+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection41"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection41"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.883+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:47.883+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection42"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection42"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:48.167+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:48.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection43"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection43"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:48.43+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:48.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection44"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection44"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:48.82+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:48.82+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection45"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection45"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:49.18+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:49.18+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection46"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection46"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:49.477+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:49.477+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection47"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection47"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:49.773+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:49.773+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection48"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection48"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:50.197+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:50.197+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection49"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection49"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:50.603+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:50.603+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection5"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection5"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.79+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:37.79+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection50"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection50"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:50.837+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:50.837+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection51"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection51"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.087+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.087+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection52"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection52"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.337+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.337+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection53"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection53"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.587+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.587+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection54"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection54"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.87+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:51.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection55"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection55"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.15+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.15+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection56"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection56"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.4+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection57"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection57"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.667+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.667+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection58"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection58"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.917+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:52.917+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection59"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection59"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:53.167+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:53.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection6"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection6"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.103+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.103+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection60"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection60"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:53.463+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:53.463+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection61"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection61"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:53.727+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:53.727+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection62"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection62"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.01+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.01+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection63"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection63"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.273+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.273+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection64"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection64"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.523+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.523+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection65"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection65"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.807+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:54.807+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection66"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection66"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.103+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.103+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection67"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection67"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.37+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection68"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection68"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.62+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection69"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection69"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.883+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:55.883+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection7"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection7"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.353+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection70"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection70"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.133+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.133+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection71"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection71"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.383+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.383+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection72"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection72"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.633+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.633+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection73"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection73"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.87+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:56.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection74"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection74"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.12+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.12+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection75"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection75"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.37+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection76"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection76"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.62+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection77"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection77"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.87+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:57.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection78"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection78"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.12+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.12+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection79"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection79"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.37+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection8"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection8"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.587+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.587+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection80"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection80"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.633+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.633+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection81"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection81"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.917+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:58.917+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection82"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection82"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:59.18+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:59.18+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection83"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection83"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:59.477+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:59.477+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection84"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection84"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:59.713+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:59.713+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection85"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection85"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.01+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.01+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection86"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection86"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.26+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.26+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection87"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection87"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.62+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection88"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection88"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.98+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:00.98+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection89"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection89"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:01.353+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:01.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection9"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection9"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.867+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:52:38.867+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection90"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection90"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:01.697+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:01.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection91"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection91"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:01.963+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:01.963+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection92"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection92"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:02.29+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:02.29+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection93"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection93"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:02.587+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:02.587+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection94"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection94"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:02.87+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:02.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection95"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection95"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:03.26+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:03.26+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection96"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection96"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:03.51+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:03.51+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection97"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection97"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:03.76+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:03.76+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection98"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection98"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.027+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.027+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myConnection99"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/myConnection99"), - // Properties: &armautomation.ConnectionProperties{ - // ConnectionType: &armautomation.ConnectionTypeAssociationProperty{ - // Name: to.Ptr("Azure"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.26+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T07:53:04.26+00:00"); return t}()), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/connectiontype_client.go b/sdk/resourcemanager/automation/armautomation/connectiontype_client.go index 37e096751e1e..cde92caf880e 100644 --- a/sdk/resourcemanager/automation/armautomation/connectiontype_client.go +++ b/sdk/resourcemanager/automation/armautomation/connectiontype_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewConnectionTypeClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create a connection type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - connectionTypeName - The parameters supplied to the create or update connection type operation. @@ -56,18 +55,21 @@ func NewConnectionTypeClient(subscriptionID string, credential azcore.TokenCrede // - options - ConnectionTypeClientCreateOrUpdateOptions contains the optional parameters for the ConnectionTypeClient.CreateOrUpdate // method. func (client *ConnectionTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters, options *ConnectionTypeClientCreateOrUpdateOptions) (ConnectionTypeClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, connectionTypeName, parameters, options) if err != nil { return ConnectionTypeClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionTypeClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return ConnectionTypeClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ConnectionTypeClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *ConnectionTypeClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,22 +117,24 @@ func (client *ConnectionTypeClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete the connection type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - connectionTypeName - The name of connection type. // - options - ConnectionTypeClientDeleteOptions contains the optional parameters for the ConnectionTypeClient.Delete method. func (client *ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, options *ConnectionTypeClientDeleteOptions) (ConnectionTypeClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, connectionTypeName, options) if err != nil { return ConnectionTypeClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionTypeClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ConnectionTypeClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ConnectionTypeClientDeleteResponse{}, err } return ConnectionTypeClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *ConnectionTypeClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,24 +172,27 @@ func (client *ConnectionTypeClient) deleteCreateRequest(ctx context.Context, res // Get - Retrieve the connection type identified by connection type name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - connectionTypeName - The name of connection type. // - options - ConnectionTypeClientGetOptions contains the optional parameters for the ConnectionTypeClient.Get method. func (client *ConnectionTypeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, options *ConnectionTypeClientGetOptions) (ConnectionTypeClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, connectionTypeName, options) if err != nil { return ConnectionTypeClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ConnectionTypeClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionTypeClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionTypeClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -209,7 +219,7 @@ func (client *ConnectionTypeClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,7 +236,7 @@ func (client *ConnectionTypeClient) getHandleResponse(resp *http.Response) (Conn // NewListByAutomationAccountPager - Retrieve a list of connection types. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - ConnectionTypeClientListByAutomationAccountOptions contains the optional parameters for the ConnectionTypeClient.NewListByAutomationAccountPager @@ -279,7 +289,7 @@ func (client *ConnectionTypeClient) listByAutomationAccountCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/connectiontype_client_example_test.go b/sdk/resourcemanager/automation/armautomation/connectiontype_client_example_test.go deleted file mode 100644 index df09fd356314..000000000000 --- a/sdk/resourcemanager/automation/armautomation/connectiontype_client_example_test.go +++ /dev/null @@ -1,4857 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteConnectionType.json -func ExampleConnectionTypeClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewConnectionTypeClient().Delete(ctx, "rg", "myAutomationAccount22", "myCT", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnectionType.json -func ExampleConnectionTypeClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewConnectionTypeClient().Get(ctx, "rg", "myAutomationAccount22", "myCT", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ConnectionType = armautomation.ConnectionType{ - // Name: to.Ptr("myCT"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount22/connectionTypes/myCT"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T03:47:53.433+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T03:47:53.557+00:00"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateConnectionType.json -func ExampleConnectionTypeClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewConnectionTypeClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount22", "myCT", armautomation.ConnectionTypeCreateOrUpdateParameters{ - Name: to.Ptr("myCT"), - Properties: &armautomation.ConnectionTypeCreateOrUpdateProperties{ - FieldDefinitions: map[string]*armautomation.FieldDefinition{ - "myBoolField": { - Type: to.Ptr("bool"), - IsEncrypted: to.Ptr(false), - IsOptional: to.Ptr(false), - }, - "myStringField": { - Type: to.Ptr("string"), - IsEncrypted: to.Ptr(false), - IsOptional: to.Ptr(false), - }, - "myStringFieldEncrypted": { - Type: to.Ptr("string"), - IsEncrypted: to.Ptr(true), - IsOptional: to.Ptr(false), - }, - }, - IsGlobal: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getAllConnectionTypes_First100.json -func ExampleConnectionTypeClient_NewListByAutomationAccountPager_getConnectionTypesFirst100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectionTypeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount25", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ConnectionTypeListResult = armautomation.ConnectionTypeListResult{ - // Value: []*armautomation.ConnectionType{ - // { - // Name: to.Ptr("Azure"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/Azure"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-03-18T23:02:40.613+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "AutomationCertificateName": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "SubscriptionID": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-03-18T23:02:40.74+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("AzureClassicCertificate"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/AzureClassicCertificate"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-04-25T23:54:02.65+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "CertificateAssetName": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "SubscriptionId": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "SubscriptionName": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-04-25T23:54:03.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("AzureServicePrincipal"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/AzureServicePrincipal"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-16T23:08:41.853+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "ApplicationId": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "CertificateThumbprint": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "SubscriptionId": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "TenantId": &armautomation.FieldDefinition{ - // Type: to.Ptr("System.String"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-16T23:08:42.407+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:14.43+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:14.51+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT0"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT0"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:14.837+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:14.853+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT1"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT1"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.04+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.057+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT10"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT10"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.12+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.15+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT100"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT100"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.73+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.76+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT101"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT101"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.963+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.993+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT102"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT102"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.197+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.213+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT103"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT103"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.417+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT104"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT104"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.633+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.65+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT105"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT105"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.837+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:37.883+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT106"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT106"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.073+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.087+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT107"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT107"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.277+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.29+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT108"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT108"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.493+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.51+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT109"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT109"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.697+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.713+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT11"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT11"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.337+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.383+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT110"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT110"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.93+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:38.947+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT111"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT111"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.15+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT112"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT112"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.353+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT113"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT113"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.557+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.573+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT114"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT114"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.777+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.79+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT115"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT115"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.98+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:39.993+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT116"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT116"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.18+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.197+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT117"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT117"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.417+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT118"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT118"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.633+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.65+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT119"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT119"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.837+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:40.853+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT12"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT12"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.587+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.603+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT120"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT120"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.04+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.057+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT121"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT121"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.26+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.277+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT122"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT122"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.48+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.557+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT123"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT123"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.743+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.76+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT124"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT124"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.947+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:41.963+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT125"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT125"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.18+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.197+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT126"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT126"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.383+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT127"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT127"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.603+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT128"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT128"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.823+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:42.837+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT129"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT129"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.027+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.04+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT13"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT13"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.79+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.807+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT130"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT130"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.243+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.26+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT131"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT131"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.447+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.463+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT132"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT132"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.65+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.667+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT133"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT133"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.87+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:43.887+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT134"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT134"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.073+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.087+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT135"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT135"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.29+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.307+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT136"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT136"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.493+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.51+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT137"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT137"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.76+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:44.807+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT138"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT138"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.01+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.027+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT139"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT139"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.213+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.23+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT14"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT14"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:17.993+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.01+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT140"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT140"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.433+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.463+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT141"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT141"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.65+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.667+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT142"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT142"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.883+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:45.917+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT143"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT143"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.103+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.133+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT144"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT144"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.34+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT145"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT145"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.54+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.557+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT146"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT146"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.76+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.777+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT147"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT147"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.963+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:46.98+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT148"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT148"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.197+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.213+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT149"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT149"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.417+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT15"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT15"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.213+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.227+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT150"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT150"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.637+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.65+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT151"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT151"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.853+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:47.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT152"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT152"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.103+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT153"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT153"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.37+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT154"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT154"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.59+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.667+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT155"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT155"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.887+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:48.93+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT156"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT156"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.12+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT157"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT157"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.37+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT158"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT158"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.603+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.637+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT159"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT159"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.84+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:49.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT16"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT16"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.417+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.43+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT160"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT160"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.09+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.103+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT161"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT161"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.29+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.307+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT162"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT162"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.493+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.51+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT163"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT163"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.697+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.713+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT164"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT164"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.917+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:50.933+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT165"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT165"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.12+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.137+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT166"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT166"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.34+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT167"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT167"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.54+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.557+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT168"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT168"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.743+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.76+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT169"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT169"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.98+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:51.98+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT17"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT17"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.62+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.633+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT170"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT170"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.213+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.23+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT171"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT171"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.417+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.433+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT172"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT172"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.637+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.65+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT173"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT173"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.84+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:52.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT174"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT174"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:53.057+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:53.073+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT175"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT175"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:53.26+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:53.29+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT18"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT18"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.82+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:18.837+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT19"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT19"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.04+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.057+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT2"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT2"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.26+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.273+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT20"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT20"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.243+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.26+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT21"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT21"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.463+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.477+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT22"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT22"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.667+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.68+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT23"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT23"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.883+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:19.9+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT24"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT24"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.103+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.12+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT25"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT25"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.4+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.417+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT26"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT26"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.65+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.667+00:00"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getAllConnectionTypes_Next100.json -func ExampleConnectionTypeClient_NewListByAutomationAccountPager_getConnectionTypesNext100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewConnectionTypeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount25", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ConnectionTypeListResult = armautomation.ConnectionTypeListResult{ - // Value: []*armautomation.ConnectionType{ - // { - // Name: to.Ptr("myCT27"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT27"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.87+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:20.883+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT28"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT28"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.07+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.087+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT29"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT29"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.29+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.307+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT3"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT3"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.477+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.493+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT30"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT30"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.523+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.54+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT31"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT31"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.727+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.743+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT32"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT32"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.93+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:21.947+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT33"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT33"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.133+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.15+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT34"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT34"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.353+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT35"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT35"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.57+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.587+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT36"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT36"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.773+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.79+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT37"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT37"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.977+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:22.993+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT38"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT38"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.197+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.213+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT39"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT39"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.417+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.447+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT4"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT4"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.68+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT40"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT40"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.633+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.65+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT41"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT41"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.853+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:23.87+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT42"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT42"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.057+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.07+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT43"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT43"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.26+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.273+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT44"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT44"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.477+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.493+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT45"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT45"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.68+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT46"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT46"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.883+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:24.9+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT47"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT47"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.103+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.12+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT48"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT48"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.307+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.32+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT49"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT49"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.523+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.54+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT5"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT5"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.9+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:15.917+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT50"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT50"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.727+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.743+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT51"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT51"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.93+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:25.947+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT52"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT52"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.133+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT53"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT53"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.353+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.37+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT54"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT54"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.57+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.587+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT55"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT55"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.773+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.79+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT56"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT56"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.977+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:26.993+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT57"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT57"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.197+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.213+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT58"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT58"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.477+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.493+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT59"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT59"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.68+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT6"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT6"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.133+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.167+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT60"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT60"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.917+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:27.947+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT61"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT61"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.133+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.15+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT62"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT62"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.337+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT63"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT63"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.587+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.587+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT64"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT64"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.79+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.807+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT65"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT65"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:28.993+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.01+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT66"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT66"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.197+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.213+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT67"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT67"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.417+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.463+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT68"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT68"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.65+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.697+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT69"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT69"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.883+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:29.9+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT7"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT7"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.4+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.447+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT70"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT70"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.087+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.12+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT71"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT71"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.32+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.353+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT72"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT72"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.557+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.57+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT73"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT73"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.773+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.79+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT74"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT74"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.98+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:30.98+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT75"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT75"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.18+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.2+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT76"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT76"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.383+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.4+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT77"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT77"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.587+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT78"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT78"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.837+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:31.853+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT79"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT79"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.057+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.057+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT8"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT8"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.633+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.68+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT80"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT80"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.26+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.277+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT81"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT81"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.493+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.51+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT82"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT82"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.73+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.743+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT83"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT83"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.93+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:32.947+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT84"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT84"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.133+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.197+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT85"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT85"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.4+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.417+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT86"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT86"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.603+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT87"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT87"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.82+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:33.837+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT88"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT88"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.027+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.04+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT89"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT89"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.23+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.243+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT9"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT9"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.883+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:16.917+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT90"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT90"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.43+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.48+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT91"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT91"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.667+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.713+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT92"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT92"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.9+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:34.947+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT93"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT93"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.133+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.15+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT94"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT94"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.37+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.417+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT95"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT95"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.603+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.62+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT96"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT96"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.823+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:35.837+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT97"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT97"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.027+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.04+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT98"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT98"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.243+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.29+00:00"); return t}()), - // }, - // }, - // { - // Name: to.Ptr("myCT99"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount25/connectionTypes/myCT99"), - // Properties: &armautomation.ConnectionTypeProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.493+00:00"); return t}()), - // FieldDefinitions: map[string]*armautomation.FieldDefinition{ - // "myBoolField": &armautomation.FieldDefinition{ - // Type: to.Ptr("bool"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringField": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(false), - // IsOptional: to.Ptr(false), - // }, - // "myStringFieldEncrypted": &armautomation.FieldDefinition{ - // Type: to.Ptr("string"), - // IsEncrypted: to.Ptr(true), - // IsOptional: to.Ptr(false), - // }, - // }, - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T06:25:36.527+00:00"); return t}()), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/constants.go b/sdk/resourcemanager/automation/armautomation/constants.go index a794aa3788ac..4ca18888ad1b 100644 --- a/sdk/resourcemanager/automation/armautomation/constants.go +++ b/sdk/resourcemanager/automation/armautomation/constants.go @@ -3,15 +3,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation const ( moduleName = "armautomation" - moduleVersion = "v0.8.1" + moduleVersion = "v0.9.0" ) // AgentRegistrationKeyName - Gets or sets the agent registration key name - primary or secondary. @@ -410,42 +409,44 @@ func PossibleLinuxUpdateClassesValues() []LinuxUpdateClasses { type ModuleProvisioningState string const ( - ModuleProvisioningStateCreated ModuleProvisioningState = "Created" - ModuleProvisioningStateCreating ModuleProvisioningState = "Creating" - ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook" - ModuleProvisioningStateRunningImportModuleRunbook ModuleProvisioningState = "RunningImportModuleRunbook" - ModuleProvisioningStateContentRetrieved ModuleProvisioningState = "ContentRetrieved" - ModuleProvisioningStateContentDownloaded ModuleProvisioningState = "ContentDownloaded" - ModuleProvisioningStateContentValidated ModuleProvisioningState = "ContentValidated" + ModuleProvisioningStateActivitiesStored ModuleProvisioningState = "ActivitiesStored" + ModuleProvisioningStateCanceled ModuleProvisioningState = "Canceled" + ModuleProvisioningStateCancelled ModuleProvisioningState = "Cancelled" ModuleProvisioningStateConnectionTypeImported ModuleProvisioningState = "ConnectionTypeImported" + ModuleProvisioningStateContentDownloaded ModuleProvisioningState = "ContentDownloaded" + ModuleProvisioningStateContentRetrieved ModuleProvisioningState = "ContentRetrieved" ModuleProvisioningStateContentStored ModuleProvisioningState = "ContentStored" + ModuleProvisioningStateContentValidated ModuleProvisioningState = "ContentValidated" + ModuleProvisioningStateCreated ModuleProvisioningState = "Created" + ModuleProvisioningStateCreating ModuleProvisioningState = "Creating" + ModuleProvisioningStateFailed ModuleProvisioningState = "Failed" ModuleProvisioningStateModuleDataStored ModuleProvisioningState = "ModuleDataStored" - ModuleProvisioningStateActivitiesStored ModuleProvisioningState = "ActivitiesStored" ModuleProvisioningStateModuleImportRunbookComplete ModuleProvisioningState = "ModuleImportRunbookComplete" + ModuleProvisioningStateRunningImportModuleRunbook ModuleProvisioningState = "RunningImportModuleRunbook" + ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook" ModuleProvisioningStateSucceeded ModuleProvisioningState = "Succeeded" - ModuleProvisioningStateFailed ModuleProvisioningState = "Failed" - ModuleProvisioningStateCancelled ModuleProvisioningState = "Cancelled" ModuleProvisioningStateUpdating ModuleProvisioningState = "Updating" ) // PossibleModuleProvisioningStateValues returns the possible values for the ModuleProvisioningState const type. func PossibleModuleProvisioningStateValues() []ModuleProvisioningState { return []ModuleProvisioningState{ - ModuleProvisioningStateCreated, - ModuleProvisioningStateCreating, - ModuleProvisioningStateStartingImportModuleRunbook, - ModuleProvisioningStateRunningImportModuleRunbook, - ModuleProvisioningStateContentRetrieved, - ModuleProvisioningStateContentDownloaded, - ModuleProvisioningStateContentValidated, + ModuleProvisioningStateActivitiesStored, + ModuleProvisioningStateCanceled, + ModuleProvisioningStateCancelled, ModuleProvisioningStateConnectionTypeImported, + ModuleProvisioningStateContentDownloaded, + ModuleProvisioningStateContentRetrieved, ModuleProvisioningStateContentStored, + ModuleProvisioningStateContentValidated, + ModuleProvisioningStateCreated, + ModuleProvisioningStateCreating, + ModuleProvisioningStateFailed, ModuleProvisioningStateModuleDataStored, - ModuleProvisioningStateActivitiesStored, ModuleProvisioningStateModuleImportRunbookComplete, + ModuleProvisioningStateRunningImportModuleRunbook, + ModuleProvisioningStateStartingImportModuleRunbook, ModuleProvisioningStateSucceeded, - ModuleProvisioningStateFailed, - ModuleProvisioningStateCancelled, ModuleProvisioningStateUpdating, } } @@ -454,15 +455,15 @@ func PossibleModuleProvisioningStateValues() []ModuleProvisioningState { type OperatingSystemType string const ( - OperatingSystemTypeWindows OperatingSystemType = "Windows" OperatingSystemTypeLinux OperatingSystemType = "Linux" + OperatingSystemTypeWindows OperatingSystemType = "Windows" ) // PossibleOperatingSystemTypeValues returns the possible values for the OperatingSystemType const type. func PossibleOperatingSystemTypeValues() []OperatingSystemType { return []OperatingSystemType{ - OperatingSystemTypeWindows, OperatingSystemTypeLinux, + OperatingSystemTypeWindows, } } @@ -488,19 +489,19 @@ func PossibleProvisioningStateValues() []ProvisioningState { type ResourceIdentityType string const ( + ResourceIdentityTypeNone ResourceIdentityType = "None" ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" - ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - ResourceIdentityTypeNone ResourceIdentityType = "None" + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" ) // PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type. func PossibleResourceIdentityTypeValues() []ResourceIdentityType { return []ResourceIdentityType{ + ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, - ResourceIdentityTypeUserAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, - ResourceIdentityTypeNone, + ResourceIdentityTypeUserAssigned, } } @@ -530,6 +531,7 @@ const ( RunbookTypeEnumGraphPowerShell RunbookTypeEnum = "GraphPowerShell" RunbookTypeEnumGraphPowerShellWorkflow RunbookTypeEnum = "GraphPowerShellWorkflow" RunbookTypeEnumPowerShell RunbookTypeEnum = "PowerShell" + RunbookTypeEnumPowerShell72 RunbookTypeEnum = "PowerShell72" RunbookTypeEnumPowerShellWorkflow RunbookTypeEnum = "PowerShellWorkflow" RunbookTypeEnumPython2 RunbookTypeEnum = "Python2" RunbookTypeEnumPython3 RunbookTypeEnum = "Python3" @@ -543,6 +545,7 @@ func PossibleRunbookTypeEnumValues() []RunbookTypeEnum { RunbookTypeEnumGraphPowerShell, RunbookTypeEnumGraphPowerShellWorkflow, RunbookTypeEnumPowerShell, + RunbookTypeEnumPowerShell72, RunbookTypeEnumPowerShellWorkflow, RunbookTypeEnumPython2, RunbookTypeEnumPython3, diff --git a/sdk/resourcemanager/automation/armautomation/credential_client.go b/sdk/resourcemanager/automation/armautomation/credential_client.go index d3f883ff3d72..57ff7cb1832f 100644 --- a/sdk/resourcemanager/automation/armautomation/credential_client.go +++ b/sdk/resourcemanager/automation/armautomation/credential_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewCredentialClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Create a credential. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - credentialName - The parameters supplied to the create or update credential operation. @@ -56,18 +55,21 @@ func NewCredentialClient(subscriptionID string, credential azcore.TokenCredentia // - options - CredentialClientCreateOrUpdateOptions contains the optional parameters for the CredentialClient.CreateOrUpdate // method. func (client *CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters, options *CredentialClientCreateOrUpdateOptions) (CredentialClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, credentialName, parameters, options) if err != nil { return CredentialClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CredentialClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CredentialClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *CredentialClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,22 +117,24 @@ func (client *CredentialClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Delete the credential. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - credentialName - The name of credential. // - options - CredentialClientDeleteOptions contains the optional parameters for the CredentialClient.Delete method. func (client *CredentialClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, options *CredentialClientDeleteOptions) (CredentialClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, credentialName, options) if err != nil { return CredentialClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CredentialClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CredentialClientDeleteResponse{}, err } return CredentialClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *CredentialClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,24 +172,27 @@ func (client *CredentialClient) deleteCreateRequest(ctx context.Context, resourc // Get - Retrieve the credential identified by credential name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - credentialName - The name of credential. // - options - CredentialClientGetOptions contains the optional parameters for the CredentialClient.Get method. func (client *CredentialClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, options *CredentialClientGetOptions) (CredentialClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, credentialName, options) if err != nil { return CredentialClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CredentialClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CredentialClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -209,7 +219,7 @@ func (client *CredentialClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,7 +236,7 @@ func (client *CredentialClient) getHandleResponse(resp *http.Response) (Credenti // NewListByAutomationAccountPager - Retrieve a list of credentials. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - CredentialClientListByAutomationAccountOptions contains the optional parameters for the CredentialClient.NewListByAutomationAccountPager @@ -279,7 +289,7 @@ func (client *CredentialClient) listByAutomationAccountCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,25 +307,28 @@ func (client *CredentialClient) listByAutomationAccountHandleResponse(resp *http // Update - Update a credential. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - credentialName - The parameters supplied to the Update credential operation. // - parameters - The parameters supplied to the Update credential operation. // - options - CredentialClientUpdateOptions contains the optional parameters for the CredentialClient.Update method. func (client *CredentialClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters, options *CredentialClientUpdateOptions) (CredentialClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, credentialName, parameters, options) if err != nil { return CredentialClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CredentialClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CredentialClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CredentialClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -342,10 +355,13 @@ func (client *CredentialClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/credential_client_example_test.go b/sdk/resourcemanager/automation/armautomation/credential_client_example_test.go deleted file mode 100644 index e0988a051060..000000000000 --- a/sdk/resourcemanager/automation/armautomation/credential_client_example_test.go +++ /dev/null @@ -1,2196 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteCredentialExisting.json -func ExampleCredentialClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCredentialClient().Delete(ctx, "rg", "myAutomationAccount20", "myCredential", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCredential.json -func ExampleCredentialClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCredentialClient().Get(ctx, "rg", "myAutomationAccount18", "myCredential", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Credential = armautomation.Credential{ - // Name: to.Ptr("myCredential"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/credentials/myCredential"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:04:10.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:04:16.423+00:00"); return t}()), - // UserName: to.Ptr("mylingaiah"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateCredential.json -func ExampleCredentialClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCredentialClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount18", "myCredential", armautomation.CredentialCreateOrUpdateParameters{ - Name: to.Ptr("myCredential"), - Properties: &armautomation.CredentialCreateOrUpdateProperties{ - Description: to.Ptr("my description goes here"), - Password: to.Ptr(""), - UserName: to.Ptr("mylingaiah"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Credential = armautomation.Credential{ - // Name: to.Ptr("myCredential"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/credentials/myCredential"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:04:10.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:04:13.567+00:00"); return t}()), - // UserName: to.Ptr("mylingaiah"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateCredential_patch.json -func ExampleCredentialClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCredentialClient().Update(ctx, "rg", "myAutomationAccount18", "myCredential", armautomation.CredentialUpdateParameters{ - Name: to.Ptr("myCredential"), - Properties: &armautomation.CredentialUpdateProperties{ - Description: to.Ptr("my description goes here"), - Password: to.Ptr(""), - UserName: to.Ptr("mylingaiah"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Credential = armautomation.Credential{ - // Name: to.Ptr("myCredential"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/credentials/myCredential"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:04:10.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:04:13.567+00:00"); return t}()), - // UserName: to.Ptr("mylingaiah"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCredentialsByAutomationAccount.json -func ExampleCredentialClient_NewListByAutomationAccountPager_listCredentialsByAutomationAccountFirst100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCredentialClient().NewListByAutomationAccountPager("rg", "myAutomationAccount20", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CredentialListResult = armautomation.CredentialListResult{ - // Value: []*armautomation.Credential{ - // { - // Name: to.Ptr("myCredential"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:38.91+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:45.393+00:00"); return t}()), - // UserName: to.Ptr("mylingaiah"), - // }, - // }, - // { - // Name: to.Ptr("myCredential0"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential0"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:51.77+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:51.77+00:00"); return t}()), - // UserName: to.Ptr("myCredential0"), - // }, - // }, - // { - // Name: to.Ptr("myCredential1"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential1"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:52.113+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:52.113+00:00"); return t}()), - // UserName: to.Ptr("myCredential1"), - // }, - // }, - // { - // Name: to.Ptr("myCredential10"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential10"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:55.3+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:55.3+00:00"); return t}()), - // UserName: to.Ptr("myCredential10"), - // }, - // }, - // { - // Name: to.Ptr("myCredential100"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential100"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:25.41+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:25.41+00:00"); return t}()), - // UserName: to.Ptr("myCredential100"), - // }, - // }, - // { - // Name: to.Ptr("myCredential101"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential101"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:25.69+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:25.69+00:00"); return t}()), - // UserName: to.Ptr("myCredential101"), - // }, - // }, - // { - // Name: to.Ptr("myCredential102"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential102"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:26.003+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:26.003+00:00"); return t}()), - // UserName: to.Ptr("myCredential102"), - // }, - // }, - // { - // Name: to.Ptr("myCredential103"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential103"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:26.337+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:26.337+00:00"); return t}()), - // UserName: to.Ptr("myCredential103"), - // }, - // }, - // { - // Name: to.Ptr("myCredential104"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential104"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:26.677+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:26.677+00:00"); return t}()), - // UserName: to.Ptr("myCredential104"), - // }, - // }, - // { - // Name: to.Ptr("myCredential105"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential105"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.02+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.02+00:00"); return t}()), - // UserName: to.Ptr("myCredential105"), - // }, - // }, - // { - // Name: to.Ptr("myCredential106"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential106"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.35+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.35+00:00"); return t}()), - // UserName: to.Ptr("myCredential106"), - // }, - // }, - // { - // Name: to.Ptr("myCredential107"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential107"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.66+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.66+00:00"); return t}()), - // UserName: to.Ptr("myCredential107"), - // }, - // }, - // { - // Name: to.Ptr("myCredential108"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential108"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.99+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:27.99+00:00"); return t}()), - // UserName: to.Ptr("myCredential108"), - // }, - // }, - // { - // Name: to.Ptr("myCredential109"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential109"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:28.3+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:28.3+00:00"); return t}()), - // UserName: to.Ptr("myCredential109"), - // }, - // }, - // { - // Name: to.Ptr("myCredential11"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential11"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:55.677+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:55.677+00:00"); return t}()), - // UserName: to.Ptr("myCredential11"), - // }, - // }, - // { - // Name: to.Ptr("myCredential110"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential110"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:28.63+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:28.63+00:00"); return t}()), - // UserName: to.Ptr("myCredential110"), - // }, - // }, - // { - // Name: to.Ptr("myCredential111"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential111"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:28.943+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:28.943+00:00"); return t}()), - // UserName: to.Ptr("myCredential111"), - // }, - // }, - // { - // Name: to.Ptr("myCredential112"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential112"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:29.253+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:29.253+00:00"); return t}()), - // UserName: to.Ptr("myCredential112"), - // }, - // }, - // { - // Name: to.Ptr("myCredential113"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential113"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:29.567+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:29.567+00:00"); return t}()), - // UserName: to.Ptr("myCredential113"), - // }, - // }, - // { - // Name: to.Ptr("myCredential114"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential114"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:29.88+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:29.88+00:00"); return t}()), - // UserName: to.Ptr("myCredential114"), - // }, - // }, - // { - // Name: to.Ptr("myCredential115"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential115"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:30.207+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:30.207+00:00"); return t}()), - // UserName: to.Ptr("myCredential115"), - // }, - // }, - // { - // Name: to.Ptr("myCredential116"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential116"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:30.52+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:30.52+00:00"); return t}()), - // UserName: to.Ptr("myCredential116"), - // }, - // }, - // { - // Name: to.Ptr("myCredential117"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential117"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:30.833+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:30.833+00:00"); return t}()), - // UserName: to.Ptr("myCredential117"), - // }, - // }, - // { - // Name: to.Ptr("myCredential118"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential118"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:31.24+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:31.24+00:00"); return t}()), - // UserName: to.Ptr("myCredential118"), - // }, - // }, - // { - // Name: to.Ptr("myCredential119"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential119"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:31.6+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:31.6+00:00"); return t}()), - // UserName: to.Ptr("myCredential119"), - // }, - // }, - // { - // Name: to.Ptr("myCredential12"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential12"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:56.02+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:56.02+00:00"); return t}()), - // UserName: to.Ptr("myCredential12"), - // }, - // }, - // { - // Name: to.Ptr("myCredential120"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential120"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:31.943+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:31.943+00:00"); return t}()), - // UserName: to.Ptr("myCredential120"), - // }, - // }, - // { - // Name: to.Ptr("myCredential121"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential121"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:32.333+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:32.333+00:00"); return t}()), - // UserName: to.Ptr("myCredential121"), - // }, - // }, - // { - // Name: to.Ptr("myCredential122"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential122"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:32.66+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:32.66+00:00"); return t}()), - // UserName: to.Ptr("myCredential122"), - // }, - // }, - // { - // Name: to.Ptr("myCredential123"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential123"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:32.957+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:32.957+00:00"); return t}()), - // UserName: to.Ptr("myCredential123"), - // }, - // }, - // { - // Name: to.Ptr("myCredential124"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential124"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:33.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:33.27+00:00"); return t}()), - // UserName: to.Ptr("myCredential124"), - // }, - // }, - // { - // Name: to.Ptr("myCredential125"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential125"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:33.6+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:33.6+00:00"); return t}()), - // UserName: to.Ptr("myCredential125"), - // }, - // }, - // { - // Name: to.Ptr("myCredential126"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential126"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:33.957+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:33.957+00:00"); return t}()), - // UserName: to.Ptr("myCredential126"), - // }, - // }, - // { - // Name: to.Ptr("myCredential127"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential127"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:34.287+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:34.287+00:00"); return t}()), - // UserName: to.Ptr("myCredential127"), - // }, - // }, - // { - // Name: to.Ptr("myCredential128"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential128"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:34.613+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:34.613+00:00"); return t}()), - // UserName: to.Ptr("myCredential128"), - // }, - // }, - // { - // Name: to.Ptr("myCredential129"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential129"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:34.973+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:34.973+00:00"); return t}()), - // UserName: to.Ptr("myCredential129"), - // }, - // }, - // { - // Name: to.Ptr("myCredential13"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential13"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:56.393+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:56.393+00:00"); return t}()), - // UserName: to.Ptr("myCredential13"), - // }, - // }, - // { - // Name: to.Ptr("myCredential130"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential130"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:35.363+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:35.363+00:00"); return t}()), - // UserName: to.Ptr("myCredential130"), - // }, - // }, - // { - // Name: to.Ptr("myCredential131"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential131"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:35.707+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:35.707+00:00"); return t}()), - // UserName: to.Ptr("myCredential131"), - // }, - // }, - // { - // Name: to.Ptr("myCredential132"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential132"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:36.037+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:36.037+00:00"); return t}()), - // UserName: to.Ptr("myCredential132"), - // }, - // }, - // { - // Name: to.Ptr("myCredential133"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential133"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:36.38+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:36.38+00:00"); return t}()), - // UserName: to.Ptr("myCredential133"), - // }, - // }, - // { - // Name: to.Ptr("myCredential134"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential134"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:36.74+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:36.74+00:00"); return t}()), - // UserName: to.Ptr("myCredential134"), - // }, - // }, - // { - // Name: to.Ptr("myCredential135"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential135"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:37.05+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:37.05+00:00"); return t}()), - // UserName: to.Ptr("myCredential135"), - // }, - // }, - // { - // Name: to.Ptr("myCredential136"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential136"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:37.41+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:37.41+00:00"); return t}()), - // UserName: to.Ptr("myCredential136"), - // }, - // }, - // { - // Name: to.Ptr("myCredential137"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential137"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:37.723+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:37.723+00:00"); return t}()), - // UserName: to.Ptr("myCredential137"), - // }, - // }, - // { - // Name: to.Ptr("myCredential138"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential138"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:38.037+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:38.037+00:00"); return t}()), - // UserName: to.Ptr("myCredential138"), - // }, - // }, - // { - // Name: to.Ptr("myCredential139"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential139"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:38.35+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:38.35+00:00"); return t}()), - // UserName: to.Ptr("myCredential139"), - // }, - // }, - // { - // Name: to.Ptr("myCredential14"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential14"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:56.723+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:56.723+00:00"); return t}()), - // UserName: to.Ptr("myCredential14"), - // }, - // }, - // { - // Name: to.Ptr("myCredential140"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential140"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:38.71+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:38.71+00:00"); return t}()), - // UserName: to.Ptr("myCredential140"), - // }, - // }, - // { - // Name: to.Ptr("myCredential141"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential141"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.037+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.037+00:00"); return t}()), - // UserName: to.Ptr("myCredential141"), - // }, - // }, - // { - // Name: to.Ptr("myCredential142"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential142"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.35+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.35+00:00"); return t}()), - // UserName: to.Ptr("myCredential142"), - // }, - // }, - // { - // Name: to.Ptr("myCredential143"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential143"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.677+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.677+00:00"); return t}()), - // UserName: to.Ptr("myCredential143"), - // }, - // }, - // { - // Name: to.Ptr("myCredential144"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential144"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.99+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:39.99+00:00"); return t}()), - // UserName: to.Ptr("myCredential144"), - // }, - // }, - // { - // Name: to.Ptr("myCredential145"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential145"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:40.317+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:40.317+00:00"); return t}()), - // UserName: to.Ptr("myCredential145"), - // }, - // }, - // { - // Name: to.Ptr("myCredential146"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential146"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:40.63+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:40.63+00:00"); return t}()), - // UserName: to.Ptr("myCredential146"), - // }, - // }, - // { - // Name: to.Ptr("myCredential147"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential147"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:40.943+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:40.943+00:00"); return t}()), - // UserName: to.Ptr("myCredential147"), - // }, - // }, - // { - // Name: to.Ptr("myCredential148"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential148"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:41.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:41.27+00:00"); return t}()), - // UserName: to.Ptr("myCredential148"), - // }, - // }, - // { - // Name: to.Ptr("myCredential149"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential149"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:41.6+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:41.6+00:00"); return t}()), - // UserName: to.Ptr("myCredential149"), - // }, - // }, - // { - // Name: to.Ptr("myCredential15"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential15"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:57.033+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:57.033+00:00"); return t}()), - // UserName: to.Ptr("myCredential15"), - // }, - // }, - // { - // Name: to.Ptr("myCredential150"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential150"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:41.91+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:41.91+00:00"); return t}()), - // UserName: to.Ptr("myCredential150"), - // }, - // }, - // { - // Name: to.Ptr("myCredential151"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential151"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:42.24+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:42.24+00:00"); return t}()), - // UserName: to.Ptr("myCredential151"), - // }, - // }, - // { - // Name: to.Ptr("myCredential152"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential152"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:42.567+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:42.567+00:00"); return t}()), - // UserName: to.Ptr("myCredential152"), - // }, - // }, - // { - // Name: to.Ptr("myCredential153"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential153"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:42.88+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:42.88+00:00"); return t}()), - // UserName: to.Ptr("myCredential153"), - // }, - // }, - // { - // Name: to.Ptr("myCredential154"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential154"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:43.193+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:43.193+00:00"); return t}()), - // UserName: to.Ptr("myCredential154"), - // }, - // }, - // { - // Name: to.Ptr("myCredential155"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential155"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:43.52+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:43.52+00:00"); return t}()), - // UserName: to.Ptr("myCredential155"), - // }, - // }, - // { - // Name: to.Ptr("myCredential156"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential156"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:43.833+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:43.833+00:00"); return t}()), - // UserName: to.Ptr("myCredential156"), - // }, - // }, - // { - // Name: to.Ptr("myCredential157"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential157"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:44.147+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:44.147+00:00"); return t}()), - // UserName: to.Ptr("myCredential157"), - // }, - // }, - // { - // Name: to.Ptr("myCredential158"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential158"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:44.473+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:44.473+00:00"); return t}()), - // UserName: to.Ptr("myCredential158"), - // }, - // }, - // { - // Name: to.Ptr("myCredential159"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential159"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:44.787+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:44.787+00:00"); return t}()), - // UserName: to.Ptr("myCredential159"), - // }, - // }, - // { - // Name: to.Ptr("myCredential16"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential16"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:57.363+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:57.363+00:00"); return t}()), - // UserName: to.Ptr("myCredential16"), - // }, - // }, - // { - // Name: to.Ptr("myCredential160"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential160"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:45.1+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:45.1+00:00"); return t}()), - // UserName: to.Ptr("myCredential160"), - // }, - // }, - // { - // Name: to.Ptr("myCredential161"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential161"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:45.427+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:45.427+00:00"); return t}()), - // UserName: to.Ptr("myCredential161"), - // }, - // }, - // { - // Name: to.Ptr("myCredential162"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential162"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:45.74+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:45.74+00:00"); return t}()), - // UserName: to.Ptr("myCredential162"), - // }, - // }, - // { - // Name: to.Ptr("myCredential163"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential163"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:46.067+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:46.067+00:00"); return t}()), - // UserName: to.Ptr("myCredential163"), - // }, - // }, - // { - // Name: to.Ptr("myCredential164"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential164"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:46.38+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:46.38+00:00"); return t}()), - // UserName: to.Ptr("myCredential164"), - // }, - // }, - // { - // Name: to.Ptr("myCredential165"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential165"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:46.71+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:46.71+00:00"); return t}()), - // UserName: to.Ptr("myCredential165"), - // }, - // }, - // { - // Name: to.Ptr("myCredential166"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential166"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.037+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.037+00:00"); return t}()), - // UserName: to.Ptr("myCredential166"), - // }, - // }, - // { - // Name: to.Ptr("myCredential167"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential167"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.35+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.35+00:00"); return t}()), - // UserName: to.Ptr("myCredential167"), - // }, - // }, - // { - // Name: to.Ptr("myCredential168"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential168"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.677+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.677+00:00"); return t}()), - // UserName: to.Ptr("myCredential168"), - // }, - // }, - // { - // Name: to.Ptr("myCredential169"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential169"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.99+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:47.99+00:00"); return t}()), - // UserName: to.Ptr("myCredential169"), - // }, - // }, - // { - // Name: to.Ptr("myCredential17"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential17"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:57.677+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:57.677+00:00"); return t}()), - // UserName: to.Ptr("myCredential17"), - // }, - // }, - // { - // Name: to.Ptr("myCredential170"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential170"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:48.287+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:48.287+00:00"); return t}()), - // UserName: to.Ptr("myCredential170"), - // }, - // }, - // { - // Name: to.Ptr("myCredential171"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential171"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:48.613+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:48.613+00:00"); return t}()), - // UserName: to.Ptr("myCredential171"), - // }, - // }, - // { - // Name: to.Ptr("myCredential172"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential172"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:48.927+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:48.927+00:00"); return t}()), - // UserName: to.Ptr("myCredential172"), - // }, - // }, - // { - // Name: to.Ptr("myCredential173"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential173"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:49.257+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:49.257+00:00"); return t}()), - // UserName: to.Ptr("myCredential173"), - // }, - // }, - // { - // Name: to.Ptr("myCredential174"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential174"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:49.567+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:49.567+00:00"); return t}()), - // UserName: to.Ptr("myCredential174"), - // }, - // }, - // { - // Name: to.Ptr("myCredential175"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential175"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:49.88+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:49.88+00:00"); return t}()), - // UserName: to.Ptr("myCredential175"), - // }, - // }, - // { - // Name: to.Ptr("myCredential176"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential176"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:50.21+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:50.21+00:00"); return t}()), - // UserName: to.Ptr("myCredential176"), - // }, - // }, - // { - // Name: to.Ptr("myCredential177"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential177"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:50.537+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:50.537+00:00"); return t}()), - // UserName: to.Ptr("myCredential177"), - // }, - // }, - // { - // Name: to.Ptr("myCredential178"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential178"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:50.863+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:50.863+00:00"); return t}()), - // UserName: to.Ptr("myCredential178"), - // }, - // }, - // { - // Name: to.Ptr("myCredential179"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential179"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:51.193+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:51.193+00:00"); return t}()), - // UserName: to.Ptr("myCredential179"), - // }, - // }, - // { - // Name: to.Ptr("myCredential18"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential18"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:58.003+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:58.003+00:00"); return t}()), - // UserName: to.Ptr("myCredential18"), - // }, - // }, - // { - // Name: to.Ptr("myCredential180"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential180"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:51.6+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:51.6+00:00"); return t}()), - // UserName: to.Ptr("myCredential180"), - // }, - // }, - // { - // Name: to.Ptr("myCredential181"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential181"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:51.91+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:51.91+00:00"); return t}()), - // UserName: to.Ptr("myCredential181"), - // }, - // }, - // { - // Name: to.Ptr("myCredential182"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential182"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:52.223+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:52.223+00:00"); return t}()), - // UserName: to.Ptr("myCredential182"), - // }, - // }, - // { - // Name: to.Ptr("myCredential183"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential183"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:52.6+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:52.6+00:00"); return t}()), - // UserName: to.Ptr("myCredential183"), - // }, - // }, - // { - // Name: to.Ptr("myCredential184"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential184"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:52.927+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:52.927+00:00"); return t}()), - // UserName: to.Ptr("myCredential184"), - // }, - // }, - // { - // Name: to.Ptr("myCredential185"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential185"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:53.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:53.27+00:00"); return t}()), - // UserName: to.Ptr("myCredential185"), - // }, - // }, - // { - // Name: to.Ptr("myCredential186"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential186"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:53.583+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:53.583+00:00"); return t}()), - // UserName: to.Ptr("myCredential186"), - // }, - // }, - // { - // Name: to.Ptr("myCredential187"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential187"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:54.037+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:54.037+00:00"); return t}()), - // UserName: to.Ptr("myCredential187"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCredentialsByAutomationAccount_next100_using_nextLink.json -func ExampleCredentialClient_NewListByAutomationAccountPager_listCredentialsByAutomationAccountNext100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCredentialClient().NewListByAutomationAccountPager("rg", "myAutomationAccount20", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CredentialListResult = armautomation.CredentialListResult{ - // Value: []*armautomation.Credential{ - // { - // Name: to.Ptr("myCredential188"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential188"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:54.397+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:54.397+00:00"); return t}()), - // UserName: to.Ptr("myCredential188"), - // }, - // }, - // { - // Name: to.Ptr("myCredential189"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential189"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:54.71+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:54.71+00:00"); return t}()), - // UserName: to.Ptr("myCredential189"), - // }, - // }, - // { - // Name: to.Ptr("myCredential19"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential19"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:58.33+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:58.33+00:00"); return t}()), - // UserName: to.Ptr("myCredential19"), - // }, - // }, - // { - // Name: to.Ptr("myCredential190"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential190"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:55.037+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:55.037+00:00"); return t}()), - // UserName: to.Ptr("myCredential190"), - // }, - // }, - // { - // Name: to.Ptr("myCredential191"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential191"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:55.35+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:55.35+00:00"); return t}()), - // UserName: to.Ptr("myCredential191"), - // }, - // }, - // { - // Name: to.Ptr("myCredential192"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential192"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:55.677+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:55.677+00:00"); return t}()), - // UserName: to.Ptr("myCredential192"), - // }, - // }, - // { - // Name: to.Ptr("myCredential193"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential193"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:56.007+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:56.007+00:00"); return t}()), - // UserName: to.Ptr("myCredential193"), - // }, - // }, - // { - // Name: to.Ptr("myCredential194"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential194"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:56.333+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:56.333+00:00"); return t}()), - // UserName: to.Ptr("myCredential194"), - // }, - // }, - // { - // Name: to.Ptr("myCredential195"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential195"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:56.66+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:56.66+00:00"); return t}()), - // UserName: to.Ptr("myCredential195"), - // }, - // }, - // { - // Name: to.Ptr("myCredential196"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential196"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.007+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.007+00:00"); return t}()), - // UserName: to.Ptr("myCredential196"), - // }, - // }, - // { - // Name: to.Ptr("myCredential197"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential197"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.333+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.333+00:00"); return t}()), - // UserName: to.Ptr("myCredential197"), - // }, - // }, - // { - // Name: to.Ptr("myCredential198"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential198"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.66+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.66+00:00"); return t}()), - // UserName: to.Ptr("myCredential198"), - // }, - // }, - // { - // Name: to.Ptr("myCredential199"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential199"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.973+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:57.973+00:00"); return t}()), - // UserName: to.Ptr("myCredential199"), - // }, - // }, - // { - // Name: to.Ptr("myCredential2"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential2"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:52.44+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:52.44+00:00"); return t}()), - // UserName: to.Ptr("myCredential2"), - // }, - // }, - // { - // Name: to.Ptr("myCredential20"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential20"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:58.66+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:58.66+00:00"); return t}()), - // UserName: to.Ptr("myCredential20"), - // }, - // }, - // { - // Name: to.Ptr("myCredential200"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential200"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:58.303+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:58.303+00:00"); return t}()), - // UserName: to.Ptr("myCredential200"), - // }, - // }, - // { - // Name: to.Ptr("myCredential21"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential21"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:59.033+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:59.033+00:00"); return t}()), - // UserName: to.Ptr("myCredential21"), - // }, - // }, - // { - // Name: to.Ptr("myCredential22"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential22"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:59.363+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:59.363+00:00"); return t}()), - // UserName: to.Ptr("myCredential22"), - // }, - // }, - // { - // Name: to.Ptr("myCredential23"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential23"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:59.707+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:59.707+00:00"); return t}()), - // UserName: to.Ptr("myCredential23"), - // }, - // }, - // { - // Name: to.Ptr("myCredential24"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential24"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:00.02+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:00.02+00:00"); return t}()), - // UserName: to.Ptr("myCredential24"), - // }, - // }, - // { - // Name: to.Ptr("myCredential25"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential25"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:00.33+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:00.33+00:00"); return t}()), - // UserName: to.Ptr("myCredential25"), - // }, - // }, - // { - // Name: to.Ptr("myCredential26"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential26"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:00.707+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:00.707+00:00"); return t}()), - // UserName: to.Ptr("myCredential26"), - // }, - // }, - // { - // Name: to.Ptr("myCredential27"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential27"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:01.02+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:01.02+00:00"); return t}()), - // UserName: to.Ptr("myCredential27"), - // }, - // }, - // { - // Name: to.Ptr("myCredential28"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential28"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:01.347+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:01.347+00:00"); return t}()), - // UserName: to.Ptr("myCredential28"), - // }, - // }, - // { - // Name: to.Ptr("myCredential29"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential29"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:01.847+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:01.847+00:00"); return t}()), - // UserName: to.Ptr("myCredential29"), - // }, - // }, - // { - // Name: to.Ptr("myCredential3"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential3"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:52.863+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:52.863+00:00"); return t}()), - // UserName: to.Ptr("myCredential3"), - // }, - // }, - // { - // Name: to.Ptr("myCredential30"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential30"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:02.16+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:02.16+00:00"); return t}()), - // UserName: to.Ptr("myCredential30"), - // }, - // }, - // { - // Name: to.Ptr("myCredential31"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential31"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:02.503+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:02.503+00:00"); return t}()), - // UserName: to.Ptr("myCredential31"), - // }, - // }, - // { - // Name: to.Ptr("myCredential32"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential32"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:02.88+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:02.88+00:00"); return t}()), - // UserName: to.Ptr("myCredential32"), - // }, - // }, - // { - // Name: to.Ptr("myCredential33"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential33"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:03.177+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:03.177+00:00"); return t}()), - // UserName: to.Ptr("myCredential33"), - // }, - // }, - // { - // Name: to.Ptr("myCredential34"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential34"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:03.55+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:03.55+00:00"); return t}()), - // UserName: to.Ptr("myCredential34"), - // }, - // }, - // { - // Name: to.Ptr("myCredential35"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential35"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:03.893+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:03.893+00:00"); return t}()), - // UserName: to.Ptr("myCredential35"), - // }, - // }, - // { - // Name: to.Ptr("myCredential36"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential36"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:04.207+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:04.207+00:00"); return t}()), - // UserName: to.Ptr("myCredential36"), - // }, - // }, - // { - // Name: to.Ptr("myCredential37"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential37"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:04.55+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:04.55+00:00"); return t}()), - // UserName: to.Ptr("myCredential37"), - // }, - // }, - // { - // Name: to.Ptr("myCredential38"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential38"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:04.847+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:04.847+00:00"); return t}()), - // UserName: to.Ptr("myCredential38"), - // }, - // }, - // { - // Name: to.Ptr("myCredential39"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential39"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:05.177+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:05.177+00:00"); return t}()), - // UserName: to.Ptr("myCredential39"), - // }, - // }, - // { - // Name: to.Ptr("myCredential4"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential4"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:53.253+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:53.253+00:00"); return t}()), - // UserName: to.Ptr("myCredential4"), - // }, - // }, - // { - // Name: to.Ptr("myCredential40"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential40"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:05.49+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:05.49+00:00"); return t}()), - // UserName: to.Ptr("myCredential40"), - // }, - // }, - // { - // Name: to.Ptr("myCredential41"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential41"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:05.83+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:05.83+00:00"); return t}()), - // UserName: to.Ptr("myCredential41"), - // }, - // }, - // { - // Name: to.Ptr("myCredential42"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential42"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:06.143+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:06.143+00:00"); return t}()), - // UserName: to.Ptr("myCredential42"), - // }, - // }, - // { - // Name: to.Ptr("myCredential43"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential43"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:06.457+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:06.457+00:00"); return t}()), - // UserName: to.Ptr("myCredential43"), - // }, - // }, - // { - // Name: to.Ptr("myCredential44"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential44"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:06.94+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:06.94+00:00"); return t}()), - // UserName: to.Ptr("myCredential44"), - // }, - // }, - // { - // Name: to.Ptr("myCredential45"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential45"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:07.3+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:07.3+00:00"); return t}()), - // UserName: to.Ptr("myCredential45"), - // }, - // }, - // { - // Name: to.Ptr("myCredential46"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential46"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:07.63+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:07.63+00:00"); return t}()), - // UserName: to.Ptr("myCredential46"), - // }, - // }, - // { - // Name: to.Ptr("myCredential47"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential47"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:07.957+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:07.957+00:00"); return t}()), - // UserName: to.Ptr("myCredential47"), - // }, - // }, - // { - // Name: to.Ptr("myCredential48"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential48"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:08.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:08.27+00:00"); return t}()), - // UserName: to.Ptr("myCredential48"), - // }, - // }, - // { - // Name: to.Ptr("myCredential49"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential49"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:08.58+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:08.58+00:00"); return t}()), - // UserName: to.Ptr("myCredential49"), - // }, - // }, - // { - // Name: to.Ptr("myCredential5"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential5"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:53.567+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:53.567+00:00"); return t}()), - // UserName: to.Ptr("myCredential5"), - // }, - // }, - // { - // Name: to.Ptr("myCredential50"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential50"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.02+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.02+00:00"); return t}()), - // UserName: to.Ptr("myCredential50"), - // }, - // }, - // { - // Name: to.Ptr("myCredential51"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential51"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.33+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.33+00:00"); return t}()), - // UserName: to.Ptr("myCredential51"), - // }, - // }, - // { - // Name: to.Ptr("myCredential52"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential52"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.643+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.643+00:00"); return t}()), - // UserName: to.Ptr("myCredential52"), - // }, - // }, - // { - // Name: to.Ptr("myCredential53"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential53"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.973+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:09.973+00:00"); return t}()), - // UserName: to.Ptr("myCredential53"), - // }, - // }, - // { - // Name: to.Ptr("myCredential54"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential54"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:10.287+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:10.287+00:00"); return t}()), - // UserName: to.Ptr("myCredential54"), - // }, - // }, - // { - // Name: to.Ptr("myCredential55"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential55"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:10.66+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:10.66+00:00"); return t}()), - // UserName: to.Ptr("myCredential55"), - // }, - // }, - // { - // Name: to.Ptr("myCredential56"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential56"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:10.973+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:10.973+00:00"); return t}()), - // UserName: to.Ptr("myCredential56"), - // }, - // }, - // { - // Name: to.Ptr("myCredential57"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential57"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:11.33+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:11.33+00:00"); return t}()), - // UserName: to.Ptr("myCredential57"), - // }, - // }, - // { - // Name: to.Ptr("myCredential58"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential58"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:11.643+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:11.643+00:00"); return t}()), - // UserName: to.Ptr("myCredential58"), - // }, - // }, - // { - // Name: to.Ptr("myCredential59"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential59"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:11.99+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:11.99+00:00"); return t}()), - // UserName: to.Ptr("myCredential59"), - // }, - // }, - // { - // Name: to.Ptr("myCredential6"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential6"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:53.863+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:53.863+00:00"); return t}()), - // UserName: to.Ptr("myCredential6"), - // }, - // }, - // { - // Name: to.Ptr("myCredential60"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential60"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:12.3+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:12.3+00:00"); return t}()), - // UserName: to.Ptr("myCredential60"), - // }, - // }, - // { - // Name: to.Ptr("myCredential61"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential61"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:12.63+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:12.63+00:00"); return t}()), - // UserName: to.Ptr("myCredential61"), - // }, - // }, - // { - // Name: to.Ptr("myCredential62"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential62"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:12.957+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:12.957+00:00"); return t}()), - // UserName: to.Ptr("myCredential62"), - // }, - // }, - // { - // Name: to.Ptr("myCredential63"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential63"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:13.27+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:13.27+00:00"); return t}()), - // UserName: to.Ptr("myCredential63"), - // }, - // }, - // { - // Name: to.Ptr("myCredential64"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential64"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:13.583+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:13.583+00:00"); return t}()), - // UserName: to.Ptr("myCredential64"), - // }, - // }, - // { - // Name: to.Ptr("myCredential65"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential65"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:13.893+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:13.893+00:00"); return t}()), - // UserName: to.Ptr("myCredential65"), - // }, - // }, - // { - // Name: to.Ptr("myCredential66"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential66"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:14.207+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:14.207+00:00"); return t}()), - // UserName: to.Ptr("myCredential66"), - // }, - // }, - // { - // Name: to.Ptr("myCredential67"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential67"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:14.537+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:14.537+00:00"); return t}()), - // UserName: to.Ptr("myCredential67"), - // }, - // }, - // { - // Name: to.Ptr("myCredential68"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential68"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:14.847+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:14.847+00:00"); return t}()), - // UserName: to.Ptr("myCredential68"), - // }, - // }, - // { - // Name: to.Ptr("myCredential69"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential69"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:15.19+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:15.19+00:00"); return t}()), - // UserName: to.Ptr("myCredential69"), - // }, - // }, - // { - // Name: to.Ptr("myCredential7"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential7"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:54.19+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:54.19+00:00"); return t}()), - // UserName: to.Ptr("myCredential7"), - // }, - // }, - // { - // Name: to.Ptr("myCredential70"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential70"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:15.503+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:15.503+00:00"); return t}()), - // UserName: to.Ptr("myCredential70"), - // }, - // }, - // { - // Name: to.Ptr("myCredential71"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential71"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:15.91+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:15.91+00:00"); return t}()), - // UserName: to.Ptr("myCredential71"), - // }, - // }, - // { - // Name: to.Ptr("myCredential72"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential72"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:16.253+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:16.253+00:00"); return t}()), - // UserName: to.Ptr("myCredential72"), - // }, - // }, - // { - // Name: to.Ptr("myCredential73"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential73"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:16.567+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:16.567+00:00"); return t}()), - // UserName: to.Ptr("myCredential73"), - // }, - // }, - // { - // Name: to.Ptr("myCredential74"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential74"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:16.927+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:16.927+00:00"); return t}()), - // UserName: to.Ptr("myCredential74"), - // }, - // }, - // { - // Name: to.Ptr("myCredential75"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential75"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:17.253+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:17.253+00:00"); return t}()), - // UserName: to.Ptr("myCredential75"), - // }, - // }, - // { - // Name: to.Ptr("myCredential76"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential76"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:17.567+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:17.567+00:00"); return t}()), - // UserName: to.Ptr("myCredential76"), - // }, - // }, - // { - // Name: to.Ptr("myCredential77"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential77"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:17.88+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:17.88+00:00"); return t}()), - // UserName: to.Ptr("myCredential77"), - // }, - // }, - // { - // Name: to.Ptr("myCredential78"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential78"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:18.19+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:18.19+00:00"); return t}()), - // UserName: to.Ptr("myCredential78"), - // }, - // }, - // { - // Name: to.Ptr("myCredential79"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential79"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:18.52+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:18.52+00:00"); return t}()), - // UserName: to.Ptr("myCredential79"), - // }, - // }, - // { - // Name: to.Ptr("myCredential8"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential8"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:54.503+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:54.503+00:00"); return t}()), - // UserName: to.Ptr("myCredential8"), - // }, - // }, - // { - // Name: to.Ptr("myCredential80"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential80"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:18.833+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:18.833+00:00"); return t}()), - // UserName: to.Ptr("myCredential80"), - // }, - // }, - // { - // Name: to.Ptr("myCredential81"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential81"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:19.177+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:19.177+00:00"); return t}()), - // UserName: to.Ptr("myCredential81"), - // }, - // }, - // { - // Name: to.Ptr("myCredential82"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential82"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:19.49+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:19.49+00:00"); return t}()), - // UserName: to.Ptr("myCredential82"), - // }, - // }, - // { - // Name: to.Ptr("myCredential83"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential83"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:19.833+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:19.833+00:00"); return t}()), - // UserName: to.Ptr("myCredential83"), - // }, - // }, - // { - // Name: to.Ptr("myCredential84"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential84"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:20.177+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:20.177+00:00"); return t}()), - // UserName: to.Ptr("myCredential84"), - // }, - // }, - // { - // Name: to.Ptr("myCredential85"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential85"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:20.503+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:20.503+00:00"); return t}()), - // UserName: to.Ptr("myCredential85"), - // }, - // }, - // { - // Name: to.Ptr("myCredential86"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential86"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:20.817+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:20.817+00:00"); return t}()), - // UserName: to.Ptr("myCredential86"), - // }, - // }, - // { - // Name: to.Ptr("myCredential87"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential87"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:21.143+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:21.143+00:00"); return t}()), - // UserName: to.Ptr("myCredential87"), - // }, - // }, - // { - // Name: to.Ptr("myCredential88"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential88"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:21.457+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:21.457+00:00"); return t}()), - // UserName: to.Ptr("myCredential88"), - // }, - // }, - // { - // Name: to.Ptr("myCredential89"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential89"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:21.787+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:21.787+00:00"); return t}()), - // UserName: to.Ptr("myCredential89"), - // }, - // }, - // { - // Name: to.Ptr("myCredential9"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential9"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:54.957+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:43:54.957+00:00"); return t}()), - // UserName: to.Ptr("myCredential9"), - // }, - // }, - // { - // Name: to.Ptr("myCredential90"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential90"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:22.1+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:22.1+00:00"); return t}()), - // UserName: to.Ptr("myCredential90"), - // }, - // }, - // { - // Name: to.Ptr("myCredential91"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential91"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:22.427+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:22.427+00:00"); return t}()), - // UserName: to.Ptr("myCredential91"), - // }, - // }, - // { - // Name: to.Ptr("myCredential92"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential92"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:22.77+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:22.77+00:00"); return t}()), - // UserName: to.Ptr("myCredential92"), - // }, - // }, - // { - // Name: to.Ptr("myCredential93"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential93"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:23.083+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:23.083+00:00"); return t}()), - // UserName: to.Ptr("myCredential93"), - // }, - // }, - // { - // Name: to.Ptr("myCredential94"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential94"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:23.41+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:23.41+00:00"); return t}()), - // UserName: to.Ptr("myCredential94"), - // }, - // }, - // { - // Name: to.Ptr("myCredential95"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential95"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:23.753+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:23.753+00:00"); return t}()), - // UserName: to.Ptr("myCredential95"), - // }, - // }, - // { - // Name: to.Ptr("myCredential96"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential96"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:24.1+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:24.1+00:00"); return t}()), - // UserName: to.Ptr("myCredential96"), - // }, - // }, - // { - // Name: to.Ptr("myCredential97"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/credentials/myCredential97"), - // Properties: &armautomation.CredentialProperties{ - // Description: to.Ptr("my description goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:24.427+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T21:44:24.427+00:00"); return t}()), - // UserName: to.Ptr("myCredential97"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go b/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go index 12e74629a30f..d27bdc17d727 100644 --- a/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go +++ b/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -52,18 +51,21 @@ func NewDeletedAutomationAccountsClient(subscriptionID string, credential azcore // - options - DeletedAutomationAccountsClientListBySubscriptionOptions contains the optional parameters for the DeletedAutomationAccountsClient.ListBySubscription // method. func (client *DeletedAutomationAccountsClient) ListBySubscription(ctx context.Context, options *DeletedAutomationAccountsClientListBySubscriptionOptions) (DeletedAutomationAccountsClientListBySubscriptionResponse, error) { + var err error req, err := client.listBySubscriptionCreateRequest(ctx, options) if err != nil { return DeletedAutomationAccountsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DeletedAutomationAccountsClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedAutomationAccountsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedAutomationAccountsClientListBySubscriptionResponse{}, err } - return client.listBySubscriptionHandleResponse(resp) + resp, err := client.listBySubscriptionHandleResponse(httpResp) + return resp, err } // listBySubscriptionCreateRequest creates the ListBySubscription request. diff --git a/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client_example_test.go b/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client_example_test.go deleted file mode 100644 index 2c9db658446c..000000000000 --- a/sdk/resourcemanager/automation/armautomation/deletedautomationaccounts_client_example_test.go +++ /dev/null @@ -1,53 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2022-01-31/examples/getDeletedAutomationAccount.json -func ExampleDeletedAutomationAccountsClient_ListBySubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDeletedAutomationAccountsClient().ListBySubscription(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DeletedAutomationAccountListResult = armautomation.DeletedAutomationAccountListResult{ - // Value: []*armautomation.DeletedAutomationAccount{ - // { - // Name: to.Ptr("myAutomationAccount"), - // Type: to.Ptr("Microsoft.Automation/deletedAutomationAccounts"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/msitest/providers/Microsoft.Automation/deletedAutomationAccounts/myAutomationAccount"), - // Location: to.Ptr("westus"), - // Properties: &armautomation.DeletedAutomationAccountProperties{ - // AutomationAccountID: to.Ptr("cb855f13-0223-4fe4-8260-9e6583dfef24"), - // AutomationAccountResourceID: to.Ptr("/subscriptions/subid/resourceGroups/msitest/providers/Microsoft.Automation/automationAccounts/myAutomationAccount"), - // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // Location: to.Ptr("westus"), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go b/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go index bc6fc1da3628..6ace8bffe5d9 100644 --- a/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go +++ b/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -61,7 +60,8 @@ func (client *DscCompilationJobClient) BeginCreate(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[DscCompilationJobClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[DscCompilationJobClientCreateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[DscCompilationJobClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -72,18 +72,20 @@ func (client *DscCompilationJobClient) BeginCreate(ctx context.Context, resource // // Generated from API version 2020-01-13-preview func (client *DscCompilationJobClient) create(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobName string, parameters DscCompilationJobCreateParameters, options *DscCompilationJobClientBeginCreateOptions) (*http.Response, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, compilationJobName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -113,7 +115,10 @@ func (client *DscCompilationJobClient) createCreateRequest(ctx context.Context, reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Retrieve the Dsc configuration compilation job identified by job id. @@ -125,18 +130,21 @@ func (client *DscCompilationJobClient) createCreateRequest(ctx context.Context, // - compilationJobName - The DSC configuration Id. // - options - DscCompilationJobClientGetOptions contains the optional parameters for the DscCompilationJobClient.Get method. func (client *DscCompilationJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobName string, options *DscCompilationJobClientGetOptions) (DscCompilationJobClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, compilationJobName, options) if err != nil { return DscCompilationJobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscCompilationJobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscCompilationJobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscCompilationJobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -189,18 +197,21 @@ func (client *DscCompilationJobClient) getHandleResponse(resp *http.Response) (D // - options - DscCompilationJobClientGetStreamOptions contains the optional parameters for the DscCompilationJobClient.GetStream // method. func (client *DscCompilationJobClient) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string, options *DscCompilationJobClientGetStreamOptions) (DscCompilationJobClientGetStreamResponse, error) { + var err error req, err := client.getStreamCreateRequest(ctx, resourceGroupName, automationAccountName, jobID, jobStreamID, options) if err != nil { return DscCompilationJobClientGetStreamResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscCompilationJobClientGetStreamResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscCompilationJobClientGetStreamResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscCompilationJobClientGetStreamResponse{}, err } - return client.getStreamHandleResponse(resp) + resp, err := client.getStreamHandleResponse(httpResp) + return resp, err } // getStreamCreateRequest creates the GetStream request. diff --git a/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client_example_test.go b/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client_example_test.go deleted file mode 100644 index 46adafed5e43..000000000000 --- a/sdk/resourcemanager/automation/armautomation/dsccompilationjob_client_example_test.go +++ /dev/null @@ -1,178 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createCompilationJob.json -func ExampleDscCompilationJobClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDscCompilationJobClient().BeginCreate(ctx, "rg", "myAutomationAccount33", "TestCompilationJob", armautomation.DscCompilationJobCreateParameters{ - Properties: &armautomation.DscCompilationJobCreateProperties{ - Configuration: &armautomation.DscConfigurationAssociationProperty{ - Name: to.Ptr("SetupServer"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCompilationJob.json -func ExampleDscCompilationJobClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscCompilationJobClient().Get(ctx, "rg", "myAutomationAccount33", "TestCompilationJob", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DscCompilationJob = armautomation.DscCompilationJob{ - // Name: to.Ptr("TestCompilationJob"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/compilationjobs"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/TestCompilationJob"), - // Properties: &armautomation.DscCompilationJobProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // JobID: to.Ptr("ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // LastStatusModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.JobProvisioningStateSucceeded), - // Status: to.Ptr(armautomation.JobStatusNew), - // StatusDetails: to.Ptr("None"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCompilationJobsByAutomationAccount.json -func ExampleDscCompilationJobClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscCompilationJobClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscCompilationJobClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscCompilationJobListResult = armautomation.DscCompilationJobListResult{ - // Value: []*armautomation.DscCompilationJob{ - // { - // Name: to.Ptr("CompilationConfiguration1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/compilationjobs"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/"), - // Properties: &armautomation.DscCompilationJobProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("TestDscConfiguration"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-17T19:45:24.59+00:00"); return t}()), - // JobID: to.Ptr("e6e7fbab-183c-405a-afe6-9eb5db97921a"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-17T19:45:58.5933333+00:00"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-17T19:45:52.9833333+00:00"); return t}()), - // Status: to.Ptr(armautomation.JobStatusSuspended), - // }, - // }, - // { - // Name: to.Ptr("CompilationConfiguration2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/compilationjobs"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/"), - // Properties: &armautomation.DscCompilationJobProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("NewDscConfiguration"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:29:07.74+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:42.6+00:00"); return t}()), - // JobID: to.Ptr("111d4e06-2d88-46b4-8500-7febd4906838"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:42.6+00:00"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:26.48+00:00"); return t}()), - // Status: to.Ptr(armautomation.JobStatusCompleted), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/compilationJobStreamByJobStreamId.json -func ExampleDscCompilationJobClient_GetStream() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscCompilationJobClient().GetStream(ctx, "rg", "myAutomationAccount33", "836d4e06-2d88-46b4-8500-7febd4906838", "836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobStream = armautomation.JobStream{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838:00636481062421684835:00000000000000000001"), - // StreamText: to.Ptr(""), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Summary: to.Ptr(""), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:42.1684835+00:00"); return t}()), - // Value: map[string]any{ - // "PSComputerName": "localhost", - // "PSShowComputerName": true, - // "PSSourceJobInstanceId": "836d4e06-2d88-46b4-8500-7febd4906838", - // "value": "", - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go b/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go index 960c0626d94b..71168cfc5d2b 100644 --- a/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go +++ b/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -55,18 +54,21 @@ func NewDscCompilationJobStreamClient(subscriptionID string, credential azcore.T // - options - DscCompilationJobStreamClientListByJobOptions contains the optional parameters for the DscCompilationJobStreamClient.ListByJob // method. func (client *DscCompilationJobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, options *DscCompilationJobStreamClientListByJobOptions) (DscCompilationJobStreamClientListByJobResponse, error) { + var err error req, err := client.listByJobCreateRequest(ctx, resourceGroupName, automationAccountName, jobID, options) if err != nil { return DscCompilationJobStreamClientListByJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscCompilationJobStreamClientListByJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscCompilationJobStreamClientListByJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscCompilationJobStreamClientListByJobResponse{}, err } - return client.listByJobHandleResponse(resp) + resp, err := client.listByJobHandleResponse(httpResp) + return resp, err } // listByJobCreateRequest creates the ListByJob request. diff --git a/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client_example_test.go b/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client_example_test.go deleted file mode 100644 index 72221e12d15f..000000000000 --- a/sdk/resourcemanager/automation/armautomation/dsccompilationjobstream_client_example_test.go +++ /dev/null @@ -1,113 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/compilationJobStreamList.json -func ExampleDscCompilationJobStreamClient_ListByJob() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscCompilationJobStreamClient().ListByJob(ctx, "rg", "myAutomationAccount33", "836d4e06-2d88-46b4-8500-7febd4906838", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobStreamListResult = armautomation.JobStreamListResult{ - // Value: []*armautomation.JobStream{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062355996678_00000000000000000001"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062355996678_00000000000000000001"), - // StreamType: to.Ptr(armautomation.JobStreamTypeWarning), - // Summary: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838:[localhost]:The 'Microsoft.PowerShell.Management' module was not imported because the 'Microsoft.PowerShell.Management' snap-in was already imported."), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:35.5996678+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062380840740_00000000000000000002"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062380840740_00000000000000000002"), - // StreamType: to.Ptr(armautomation.JobStreamTypeWarning), - // Summary: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838:[localhost]:The configuration 'NewDscConfiguration' is loading one or more built-in resources without explicitly importing associated modules. Add Import-DscResource –ModuleName 'PSDesiredStateConfiguration' to your configuration to avoid this message."), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:38.084074+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062384590127_00000000000000000003"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062384590127_00000000000000000003"), - // StreamType: to.Ptr(armautomation.JobStreamTypeWarning), - // Summary: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838:[localhost]:The 'Microsoft.PowerShell.Management' module was not imported because the 'Microsoft.PowerShell.Management' snap-in was already imported."), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:38.4590127+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062387245395_00000000000000000004"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062387245395_00000000000000000004"), - // StreamType: to.Ptr(armautomation.JobStreamTypeWarning), - // Summary: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838:[localhost]:The configuration 'NewDscConfiguration' is loading one or more built-in resources without explicitly importing associated modules. Add Import-DscResource –ModuleName 'PSDesiredStateConfiguration' to your configuration to avoid this message."), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:38.7245395+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062417091181_00000000000000000005"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062417091181_00000000000000000005"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Summary: to.Ptr(""), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:41.7091181+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062418809632_00000000000000000006"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062418809632_00000000000000000006"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Summary: to.Ptr(""), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:41.8809632+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062420371712_00000000000000000007"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062420371712_00000000000000000007"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Summary: to.Ptr(""), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:42.0371712+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/compilationjobs/836d4e06-2d88-46b4-8500-7febd4906838/streams/836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Summary: to.Ptr(""), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-05T21:30:42.1684835+00:00"); return t}()), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go b/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go index 961bce0a4b70..1cf02e7aad57 100644 --- a/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go +++ b/sdk/resourcemanager/automation/armautomation/dscconfiguration_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -50,7 +49,7 @@ func NewDscConfigurationClient(subscriptionID string, credential azcore.TokenCre // CreateOrUpdateWithJSON - Create the configuration identified by configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - configurationName - The create or update parameters for configuration. @@ -58,18 +57,21 @@ func NewDscConfigurationClient(subscriptionID string, credential azcore.TokenCre // - options - DscConfigurationClientCreateOrUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithJSON // method. func (client *DscConfigurationClient) CreateOrUpdateWithJSON(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters, options *DscConfigurationClientCreateOrUpdateWithJSONOptions) (DscConfigurationClientCreateOrUpdateWithJSONResponse, error) { + var err error req, err := client.createOrUpdateWithJSONCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, parameters, options) if err != nil { return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientCreateOrUpdateWithJSONResponse{}, err } - return client.createOrUpdateWithJSONHandleResponse(resp) + resp, err := client.createOrUpdateWithJSONHandleResponse(httpResp) + return resp, err } // createOrUpdateWithJSONCreateRequest creates the CreateOrUpdateWithJSON request. @@ -96,10 +98,13 @@ func (client *DscConfigurationClient) createOrUpdateWithJSONCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateWithJSONHandleResponse handles the CreateOrUpdateWithJSON response. @@ -114,7 +119,7 @@ func (client *DscConfigurationClient) createOrUpdateWithJSONHandleResponse(resp // CreateOrUpdateWithText - Create the configuration identified by configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - configurationName - The create or update parameters for configuration. @@ -122,18 +127,21 @@ func (client *DscConfigurationClient) createOrUpdateWithJSONHandleResponse(resp // - options - DscConfigurationClientCreateOrUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithText // method. func (client *DscConfigurationClient) CreateOrUpdateWithText(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters string, options *DscConfigurationClientCreateOrUpdateWithTextOptions) (DscConfigurationClientCreateOrUpdateWithTextResponse, error) { + var err error req, err := client.createOrUpdateWithTextCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, parameters, options) if err != nil { return DscConfigurationClientCreateOrUpdateWithTextResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientCreateOrUpdateWithTextResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DscConfigurationClientCreateOrUpdateWithTextResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientCreateOrUpdateWithTextResponse{}, err } - return client.createOrUpdateWithTextHandleResponse(resp) + resp, err := client.createOrUpdateWithTextHandleResponse(httpResp) + return resp, err } // createOrUpdateWithTextCreateRequest creates the CreateOrUpdateWithText request. @@ -160,11 +168,15 @@ func (client *DscConfigurationClient) createOrUpdateWithTextCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} body := streaming.NopCloser(strings.NewReader(parameters)) - return req, req.SetBody(body, "text/plain; charset=utf-8") + if err := req.SetBody(body, "text/plain; charset=utf-8"); err != nil { + return nil, err + } + + return req, nil } // createOrUpdateWithTextHandleResponse handles the CreateOrUpdateWithText response. @@ -179,22 +191,24 @@ func (client *DscConfigurationClient) createOrUpdateWithTextHandleResponse(resp // Delete - Delete the dsc configuration identified by configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - configurationName - The configuration name. // - options - DscConfigurationClientDeleteOptions contains the optional parameters for the DscConfigurationClient.Delete method. func (client *DscConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientDeleteOptions) (DscConfigurationClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DscConfigurationClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientDeleteResponse{}, err } return DscConfigurationClientDeleteResponse{}, nil } @@ -223,7 +237,7 @@ func (client *DscConfigurationClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,24 +246,27 @@ func (client *DscConfigurationClient) deleteCreateRequest(ctx context.Context, r // Get - Retrieve the configuration identified by configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - configurationName - The configuration name. // - options - DscConfigurationClientGetOptions contains the optional parameters for the DscConfigurationClient.Get method. func (client *DscConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientGetOptions) (DscConfigurationClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -276,7 +293,7 @@ func (client *DscConfigurationClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -294,25 +311,27 @@ func (client *DscConfigurationClient) getHandleResponse(resp *http.Response) (Ds // GetContent - Retrieve the configuration script identified by configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - configurationName - The configuration name. // - options - DscConfigurationClientGetContentOptions contains the optional parameters for the DscConfigurationClient.GetContent // method. func (client *DscConfigurationClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientGetContentOptions) (DscConfigurationClientGetContentResponse, error) { + var err error req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientGetContentResponse{}, err } - return client.getContentHandleResponse(resp) + return DscConfigurationClientGetContentResponse{}, nil } // getContentCreateRequest creates the GetContent request. @@ -339,27 +358,15 @@ func (client *DscConfigurationClient) getContentCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"text/powershell"} return req, nil } -// getContentHandleResponse handles the GetContent response. -func (client *DscConfigurationClient) getContentHandleResponse(resp *http.Response) (DscConfigurationClientGetContentResponse, error) { - result := DscConfigurationClientGetContentResponse{} - body, err := runtime.Payload(resp) - if err != nil { - return DscConfigurationClientGetContentResponse{}, err - } - txt := string(body) - result.Value = &txt - return result, nil -} - // NewListByAutomationAccountPager - Retrieve a list of configurations. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - DscConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscConfigurationClient.NewListByAutomationAccountPager @@ -412,7 +419,7 @@ func (client *DscConfigurationClient) listByAutomationAccountCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } @@ -442,25 +449,28 @@ func (client *DscConfigurationClient) listByAutomationAccountHandleResponse(resp // UpdateWithJSON - Create the configuration identified by configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - configurationName - The create or update parameters for configuration. // - options - DscConfigurationClientUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.UpdateWithJSON // method. func (client *DscConfigurationClient) UpdateWithJSON(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientUpdateWithJSONOptions) (DscConfigurationClientUpdateWithJSONResponse, error) { + var err error req, err := client.updateWithJSONCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientUpdateWithJSONResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientUpdateWithJSONResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientUpdateWithJSONResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientUpdateWithJSONResponse{}, err } - return client.updateWithJSONHandleResponse(resp) + resp, err := client.updateWithJSONHandleResponse(httpResp) + return resp, err } // updateWithJSONCreateRequest creates the UpdateWithJSON request. @@ -487,11 +497,14 @@ func (client *DscConfigurationClient) updateWithJSONCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -508,25 +521,28 @@ func (client *DscConfigurationClient) updateWithJSONHandleResponse(resp *http.Re // UpdateWithText - Create the configuration identified by configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - configurationName - The create or update parameters for configuration. // - options - DscConfigurationClientUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.UpdateWithText // method. func (client *DscConfigurationClient) UpdateWithText(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, options *DscConfigurationClientUpdateWithTextOptions) (DscConfigurationClientUpdateWithTextResponse, error) { + var err error req, err := client.updateWithTextCreateRequest(ctx, resourceGroupName, automationAccountName, configurationName, options) if err != nil { return DscConfigurationClientUpdateWithTextResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscConfigurationClientUpdateWithTextResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscConfigurationClientUpdateWithTextResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscConfigurationClientUpdateWithTextResponse{}, err } - return client.updateWithTextHandleResponse(resp) + resp, err := client.updateWithTextHandleResponse(httpResp) + return resp, err } // updateWithTextCreateRequest creates the UpdateWithText request. @@ -553,12 +569,15 @@ func (client *DscConfigurationClient) updateWithTextCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { body := streaming.NopCloser(strings.NewReader(*options.Parameters)) - return req, req.SetBody(body, "text/plain; charset=utf-8") + if err := req.SetBody(body, "text/plain; charset=utf-8"); err != nil { + return nil, err + } + return req, nil } return req, nil } diff --git a/sdk/resourcemanager/automation/armautomation/dscconfiguration_client_example_test.go b/sdk/resourcemanager/automation/armautomation/dscconfiguration_client_example_test.go deleted file mode 100644 index 804c65f7bee2..000000000000 --- a/sdk/resourcemanager/automation/armautomation/dscconfiguration_client_example_test.go +++ /dev/null @@ -1,266 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/deleteDscConfiguration.json -func ExampleDscConfigurationClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDscConfigurationClient().Delete(ctx, "rg", "myAutomationAccount33", "TemplateBasic", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getDscConfiguration.json -func ExampleDscConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscConfigurationClient().Get(ctx, "rg", "myAutomationAccount33", "TemplateBasic", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DscConfiguration = armautomation.DscConfiguration{ - // Name: to.Ptr("TemplateBasic"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Configurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/TemplateBasic"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Etag: to.Ptr("\"636263396635600000\""), - // Properties: &armautomation.DscConfigurationProperties{ - // Description: to.Ptr("sample configuration"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:23.56+00:00"); return t}()), - // JobCount: to.Ptr[int32](0), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:23.56+00:00"); return t}()), - // LogVerbose: to.Ptr(false), - // Parameters: map[string]*armautomation.DscConfigurationParameter{ - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // State: to.Ptr(armautomation.DscConfigurationStatePublished), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getDscConfigurationContent.json -func ExampleDscConfigurationClient_GetContent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscConfigurationClient().GetContent(ctx, "rg", "myAutomationAccount33", "ConfigName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Value = "Configuration ConfigName {\r\n Node localhost {\r\n WindowsFeature IIS {\r\n Name = \"Web-Server\";\r\n Ensure = \"Present\"\r\n }\r\n }\r\n}" -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getAllDscConfigurations.json -func ExampleDscConfigurationClient_NewListByAutomationAccountPager_getDscConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscConfigurationClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscConfigurationClientListByAutomationAccountOptions{Filter: nil, - Skip: nil, - Top: nil, - Inlinecount: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscConfigurationListResult = armautomation.DscConfigurationListResult{ - // Value: []*armautomation.DscConfiguration{ - // { - // Name: to.Ptr("SetupServer"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Configurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.DscConfigurationProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // State: to.Ptr(armautomation.DscConfigurationStatePublished), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getPagedlDscConfigurationsWithNameFilter.json -func ExampleDscConfigurationClient_NewListByAutomationAccountPager_listPagedDscConfigurationsWithNameFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscConfigurationClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscConfigurationClientListByAutomationAccountOptions{Filter: to.Ptr("contains(name,'server')"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](2), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscConfigurationListResult = armautomation.DscConfigurationListResult{ - // TotalCount: to.Ptr[int32](4), - // Value: []*armautomation.DscConfiguration{ - // { - // Name: to.Ptr("SqlServerBig"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Configurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerBig"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.DscConfigurationProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // NodeConfigurationCount: to.Ptr[int32](1), - // State: to.Ptr(armautomation.DscConfigurationStatePublished), - // }, - // }, - // { - // Name: to.Ptr("SqlServerLittle"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Configurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerLittle"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.DscConfigurationProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // NodeConfigurationCount: to.Ptr[int32](1), - // State: to.Ptr(armautomation.DscConfigurationStatePublished), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getPagedDscConfigurationsWithNoFilter.json -func ExampleDscConfigurationClient_NewListByAutomationAccountPager_listPagedDscConfigurationsWithNoFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscConfigurationClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscConfigurationClientListByAutomationAccountOptions{Filter: nil, - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](3), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscConfigurationListResult = armautomation.DscConfigurationListResult{ - // TotalCount: to.Ptr[int32](12), - // Value: []*armautomation.DscConfiguration{ - // { - // Name: to.Ptr("SqlServerBig"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Configurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerBig"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.DscConfigurationProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // NodeConfigurationCount: to.Ptr[int32](1), - // State: to.Ptr(armautomation.DscConfigurationStatePublished), - // }, - // }, - // { - // Name: to.Ptr("SqlServerLittle"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Configurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SqlServerLittle"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.DscConfigurationProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // NodeConfigurationCount: to.Ptr[int32](1), - // State: to.Ptr(armautomation.DscConfigurationStatePublished), - // }, - // }, - // { - // Name: to.Ptr("SetupServer"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Configurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.DscConfigurationProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T18:53:24.997+00:00"); return t}()), - // NodeConfigurationCount: to.Ptr[int32](1), - // State: to.Ptr(armautomation.DscConfigurationStatePublished), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/dscnode_client.go b/sdk/resourcemanager/automation/armautomation/dscnode_client.go index 4c2cc12ac952..b20c102bd6ac 100644 --- a/sdk/resourcemanager/automation/armautomation/dscnode_client.go +++ b/sdk/resourcemanager/automation/armautomation/dscnode_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -55,16 +54,18 @@ func NewDscNodeClient(subscriptionID string, credential azcore.TokenCredential, // - nodeID - The node id. // - options - DscNodeClientDeleteOptions contains the optional parameters for the DscNodeClient.Delete method. func (client *DscNodeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, options *DscNodeClientDeleteOptions) (DscNodeClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, options) if err != nil { return DscNodeClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeClientDeleteResponse{}, err } return DscNodeClientDeleteResponse{}, nil } @@ -108,18 +109,21 @@ func (client *DscNodeClient) deleteCreateRequest(ctx context.Context, resourceGr // - nodeID - The node id. // - options - DscNodeClientGetOptions contains the optional parameters for the DscNodeClient.Get method. func (client *DscNodeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, options *DscNodeClientGetOptions) (DscNodeClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, options) if err != nil { return DscNodeClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -253,18 +257,21 @@ func (client *DscNodeClient) listByAutomationAccountHandleResponse(resp *http.Re // - dscNodeUpdateParameters - Parameters supplied to the update dsc node. // - options - DscNodeClientUpdateOptions contains the optional parameters for the DscNodeClient.Update method. func (client *DscNodeClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, dscNodeUpdateParameters DscNodeUpdateParameters, options *DscNodeClientUpdateOptions) (DscNodeClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, dscNodeUpdateParameters, options) if err != nil { return DscNodeClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -294,7 +301,10 @@ func (client *DscNodeClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dscNodeUpdateParameters) + if err := runtime.MarshalAsJSON(req, dscNodeUpdateParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/dscnode_client_example_test.go b/sdk/resourcemanager/automation/armautomation/dscnode_client_example_test.go deleted file mode 100644 index 3830bc617022..000000000000 --- a/sdk/resourcemanager/automation/armautomation/dscnode_client_example_test.go +++ /dev/null @@ -1,796 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteDscNode.json -func ExampleDscNodeClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDscNodeClient().Delete(ctx, "rg", "myAutomationAccount9", "e1243a76-a9bd-432f-bde3-ad8f317ee786", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNode.json -func ExampleDscNodeClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscNodeClient().Get(ctx, "rg", "myAutomationAccount33", "nodeId", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DscNode = armautomation.DscNode{ - // Name: to.Ptr("DSCCOMP"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("nodeId"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Pending"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateDscNode.json -func ExampleDscNodeClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscNodeClient().Update(ctx, "rg", "myAutomationAccount33", "nodeId", armautomation.DscNodeUpdateParameters{ - NodeID: to.Ptr("nodeId"), - Properties: &armautomation.DscNodeUpdateParametersProperties{ - NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - Name: to.Ptr("SetupServer.localhost"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DscNode = armautomation.DscNode{ - // Name: to.Ptr("DSCCOMP"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("nodeId"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Pending"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listAllDscNodesByAutomationAccount.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listDscNodesByAutomationAccount() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: nil, - Skip: nil, - Top: nil, - Inlinecount: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("DSCCOMP"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("nodeId"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Pending"), - // }, - // }, - // { - // Name: to.Ptr("DSCCOMP2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId2"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("nodeId2"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Pending"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationNotAssignedFilter.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listPagedDscNodesByAutomationAccountWhereNodeConfigurationsAreNotAssignedFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: to.Ptr("properties/nodeConfiguration/name eq ''"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](20), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // TotalCount: to.Ptr[int32](2), - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("Node60"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node60"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr(""), - // }, - // NodeID: to.Ptr("477F9596-92F3-479A-82F2-9EE149F2C6B0"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node61"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node61"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr(""), - // }, - // NodeID: to.Ptr("E5D5D0B5-400D-48F7-A791-612945DAC5EB"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationCustomFilter.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listPagedDscNodesByAutomationAccountWithNodeConfigurationCustomFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: to.Ptr("contains(properties/nodeConfiguration/name,'SetupServer.localhost,SetupClient.localhost,$$Not$$Configured$$')"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](4), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // TotalCount: to.Ptr[int32](12), - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("Node32"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node32"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr(""), - // }, - // NodeID: to.Ptr("477F9596-92F3-479A-82F2-9EE149F2C6B0"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node33"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node33"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("E5D5D0B5-400D-48F7-A791-612945DAC5EB"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node34"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node34"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupClient.localhost"), - // }, - // NodeID: to.Ptr("Node34"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node35"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node35"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupClient.localhost"), - // }, - // NodeID: to.Ptr("Node35"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("NotCompliant"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNameFilter.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listPagedDscNodesByAutomationAccountWithNameFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: to.Ptr("contains('DSCCOMP',name)"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](6), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // TotalCount: to.Ptr[int32](2), - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("DSCCOMP"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/DSCCOMP"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("708D250A-2169-4B54-89FF-76F5F71C252A"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("DSCCOMP2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/DSCCOMP2"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("3B4BB31A-5132-4669-A15F-A17E234D1634"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNoFilter.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listPagedDscNodesByAutomationAccountWithNoFilters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: nil, - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](2), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // TotalCount: to.Ptr[int32](152), - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("DSCCOMP"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("FCC20208-E781-41C4-A757-17AA0429B3A4"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Pending"), - // }, - // }, - // { - // Name: to.Ptr("DSCCOMP2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId2"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("A63C781C-0C50-4825-B295-B7F8ECFD0DBC"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Pending"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithStatusFilter.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listPagedDscNodesByAutomationAccountWithNodeStatusFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: to.Ptr("contains(properties/status,'Compliant,NotCompliant')"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](4), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // TotalCount: to.Ptr[int32](67), - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("Node12"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node12"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("01D64CDE-85DD-4C9B-B8F1-2F725348FDEC"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node13"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node13"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("E13076D7-A959-4067-B02F-4F014AAD22D7"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node14"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node14"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("4289B441-B9A0-4309-93FC-0C5100CFBE46"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node15"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node15"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.75.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("CBD2212B-8F4C-4049-98E7-1DBCBED7343B"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("NotCompliant"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithVersionFilter.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listPagedDscNodesByAutomationAccountWithVersionFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: to.Ptr("properties/extensionHandler/any(eh: eh/version le '2.70')"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](4), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // TotalCount: to.Ptr[int32](7), - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("Node62"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node62"), - // Properties: &armautomation.DscNodeProperties{ - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("01D64CDE-85DD-4C9B-B8F1-2F725348FDEC"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node63"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node63"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.70.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("E13076D7-A959-4067-B02F-4F014AAD22D7"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node64"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node64"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.70.0.0"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("4289B441-B9A0-4309-93FC-0C5100CFBE46"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }, - // { - // Name: to.Ptr("Node65"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Node65"), - // Properties: &armautomation.DscNodeProperties{ - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer.localhost"), - // }, - // NodeID: to.Ptr("CBD2212B-8F4C-4049-98E7-1DBCBED7343B"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("NotCompliant"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithCompositeFilter.json -func ExampleDscNodeClient_NewListByAutomationAccountPager_listPagedDscNodesWithFiltersSeparatedByAnd() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeClientListByAutomationAccountOptions{Filter: to.Ptr("properties/extensionHandler/any(eh: eh/version gt '2.70') and contains(name,'sql') and contains(properties/nodeConfiguration/name,'$$Not$$Configured$$')"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](10), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeListResult = armautomation.DscNodeListResult{ - // TotalCount: to.Ptr[int32](1), - // Value: []*armautomation.DscNode{ - // { - // Name: to.Ptr("Sql1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Nodes"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/Sql1"), - // Properties: &armautomation.DscNodeProperties{ - // ExtensionHandler: []*armautomation.DscNodeExtensionHandlerAssociationProperty{ - // { - // Name: to.Ptr("Microsoft.Powershell.DSC"), - // Version: to.Ptr("2.70.0.1"), - // }}, - // IP: to.Ptr("ip"), - // LastSeen: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-22T22:25:39.0963773+00:00"); return t}()), - // NodeConfiguration: &armautomation.DscNodeConfigurationAssociationProperty{ - // Name: to.Ptr("SetupSqlServer.localhost"), - // }, - // NodeID: to.Ptr("01D64CDE-85DD-4C9B-B8F1-2F725348FDEC"), - // RegistrationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T00:51:12.5393083+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go b/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go index b502fa645946..a231f74ba58d 100644 --- a/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go +++ b/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -49,7 +48,7 @@ func NewDscNodeConfigurationClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Create the node configuration identified by node configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - nodeConfigurationName - The Dsc node configuration name. @@ -62,7 +61,8 @@ func (client *DscNodeConfigurationClient) BeginCreateOrUpdate(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[DscNodeConfigurationClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[DscNodeConfigurationClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[DscNodeConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -71,20 +71,22 @@ func (client *DscNodeConfigurationClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create the node configuration identified by node configuration name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 func (client *DscNodeConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters, options *DscNodeConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, nodeConfigurationName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -111,32 +113,37 @@ func (client *DscNodeConfigurationClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Delete the Dsc node configurations by node configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - nodeConfigurationName - The Dsc node configuration name. // - options - DscNodeConfigurationClientDeleteOptions contains the optional parameters for the DscNodeConfigurationClient.Delete // method. func (client *DscNodeConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, options *DscNodeConfigurationClientDeleteOptions) (DscNodeConfigurationClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, nodeConfigurationName, options) if err != nil { return DscNodeConfigurationClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeConfigurationClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeConfigurationClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeConfigurationClientDeleteResponse{}, err } return DscNodeConfigurationClientDeleteResponse{}, nil } @@ -165,7 +172,7 @@ func (client *DscNodeConfigurationClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -174,25 +181,28 @@ func (client *DscNodeConfigurationClient) deleteCreateRequest(ctx context.Contex // Get - Retrieve the Dsc node configurations by node configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - nodeConfigurationName - The Dsc node configuration name. // - options - DscNodeConfigurationClientGetOptions contains the optional parameters for the DscNodeConfigurationClient.Get // method. func (client *DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, options *DscNodeConfigurationClientGetOptions) (DscNodeConfigurationClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, nodeConfigurationName, options) if err != nil { return DscNodeConfigurationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DscNodeConfigurationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscNodeConfigurationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscNodeConfigurationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -219,7 +229,7 @@ func (client *DscNodeConfigurationClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,7 +246,7 @@ func (client *DscNodeConfigurationClient) getHandleResponse(resp *http.Response) // NewListByAutomationAccountPager - Retrieve a list of dsc node configurations. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - DscNodeConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscNodeConfigurationClient.NewListByAutomationAccountPager @@ -289,7 +299,7 @@ func (client *DscNodeConfigurationClient) listByAutomationAccountCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client_example_test.go b/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client_example_test.go deleted file mode 100644 index 6bc4604c4b42..000000000000 --- a/sdk/resourcemanager/automation/armautomation/dscnodeconfiguration_client_example_test.go +++ /dev/null @@ -1,312 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteDscNodeConfiguration.json -func ExampleDscNodeConfigurationClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDscNodeConfigurationClient().Delete(ctx, "rg", "myAutomationAccount20", "configName.nodeConfigName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeConfiguration.json -func ExampleDscNodeConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDscNodeConfigurationClient().Get(ctx, "rg", "myAutomationAccount33", "SetupServer.localhost", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DscNodeConfiguration = armautomation.DscNodeConfiguration{ - // Name: to.Ptr("SetupServer.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // IncrementNodeConfigurationBuild: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateDscNodeConfiguration.json -func ExampleDscNodeConfigurationClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDscNodeConfigurationClient().BeginCreateOrUpdate(ctx, "rg", "myAutomationAccount20", "configName.nodeConfigName", armautomation.DscNodeConfigurationCreateOrUpdateParameters{ - Name: to.Ptr("configName.nodeConfigName"), - Properties: &armautomation.DscNodeConfigurationCreateOrUpdateParametersProperties{ - Configuration: &armautomation.DscConfigurationAssociationProperty{ - Name: to.Ptr("configName"), - }, - IncrementNodeConfigurationBuild: to.Ptr(true), - Source: &armautomation.ContentSource{ - Type: to.Ptr(armautomation.ContentSourceTypeEmbeddedContent), - Hash: &armautomation.ContentHash{ - Algorithm: to.Ptr("sha256"), - Value: to.Ptr("6DE256A57F01BFA29B88696D5E77A383D6E61484C7686E8DB955FA10ACE9FFE5"), - }, - Value: to.Ptr("\r\ninstance of MSFT_RoleResource as $MSFT_RoleResource1ref\r\n{\r\nResourceID = \"[WindowsFeature]IIS\";\r\n Ensure = \"Present\";\r\n SourceInfo = \"::3::32::WindowsFeature\";\r\n Name = \"Web-Server\";\r\n ModuleName = \"PsDesiredStateConfiguration\";\r\n\r\nModuleVersion = \"1.0\";\r\r\n ConfigurationName = \"configName\";\r\r\n};\r\ninstance of OMI_ConfigurationDocument\r\n\r\r\n {\r\n Version=\"2.0.0\";\r\n \r\r\n MinimumCompatibleVersion = \"1.0.0\";\r\n \r\r\n CompatibleVersionAdditionalProperties= {\"Omi_BaseResource:ConfigurationName\"};\r\n \r\r\n Author=\"weijiel\";\r\n \r\r\n GenerationDate=\"03/30/2017 13:40:25\";\r\n \r\r\n GenerationHost=\"TEST-BACKEND\";\r\n \r\r\n Name=\"configName\";\r\n\r\r\n };\r\n"), - Version: to.Ptr("1.0"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listDscNodeConfigurations.json -func ExampleDscNodeConfigurationClient_NewListByAutomationAccountPager_listDscNodeConfigurationsByAutomationAccount() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeConfigurationClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeConfigurationClientListByAutomationAccountOptions{Filter: nil, - Skip: nil, - Top: nil, - Inlinecount: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeConfigurationListResult = armautomation.DscNodeConfigurationListResult{ - // Value: []*armautomation.DscNodeConfiguration{ - // { - // Name: to.Ptr("SetupServer.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // IncrementNodeConfigurationBuild: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("SetupServer.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // IncrementNodeConfigurationBuild: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](0), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeConfigurationsWithNameFilter.json -func ExampleDscNodeConfigurationClient_NewListByAutomationAccountPager_listPagedDscNodeConfigurationsByAutomationAccountWithNameFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeConfigurationClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeConfigurationClientListByAutomationAccountOptions{Filter: to.Ptr("contains('.localhost',name)"), - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](2), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeConfigurationListResult = armautomation.DscNodeConfigurationListResult{ - // TotalCount: to.Ptr[int32](6), - // Value: []*armautomation.DscNodeConfiguration{ - // { - // Name: to.Ptr("server.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](2), - // }, - // }, - // { - // Name: to.Ptr("SetupClient.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupClient.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupClient"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](6), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeConfigurationsWithNoFilter.json -func ExampleDscNodeConfigurationClient_NewListByAutomationAccountPager_listPagedDscNodeConfigurationsByAutomationAccountWithNoFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDscNodeConfigurationClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.DscNodeConfigurationClientListByAutomationAccountOptions{Filter: nil, - Skip: to.Ptr[int32](0), - Top: to.Ptr[int32](4), - Inlinecount: to.Ptr("allpages"), - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeConfigurationListResult = armautomation.DscNodeConfigurationListResult{ - // TotalCount: to.Ptr[int32](12), - // Value: []*armautomation.DscNodeConfiguration{ - // { - // Name: to.Ptr("server.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupServer.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](2), - // }, - // }, - // { - // Name: to.Ptr("SetupClient.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SetupClient.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SetupClient"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](6), - // }, - // }, - // { - // Name: to.Ptr("webServer.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/webServer.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("webServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](5), - // }, - // }, - // { - // Name: to.Ptr("SqlServer.localhost"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/nodeConfigurations"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodeConfigurations/SqlServer.localhost"), - // Properties: &armautomation.DscNodeConfigurationProperties{ - // Configuration: &armautomation.DscConfigurationAssociationProperty{ - // Name: to.Ptr("SqlServer"), - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:17:06.8901968+00:00"); return t}()), - // NodeCount: to.Ptr[int64](1), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/fields_client.go b/sdk/resourcemanager/automation/armautomation/fields_client.go index 3cf7a6f5973d..9c24ff7e1fd8 100644 --- a/sdk/resourcemanager/automation/armautomation/fields_client.go +++ b/sdk/resourcemanager/automation/armautomation/fields_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -47,7 +46,7 @@ func NewFieldsClient(subscriptionID string, credential azcore.TokenCredential, o // NewListByTypePager - Retrieve a list of fields of a given type identified by module name. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The name of module. @@ -103,7 +102,7 @@ func (client *FieldsClient) listByTypeCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/fields_client_example_test.go b/sdk/resourcemanager/automation/armautomation/fields_client_example_test.go deleted file mode 100644 index 28e8ff9525e8..000000000000 --- a/sdk/resourcemanager/automation/armautomation/fields_client_example_test.go +++ /dev/null @@ -1,58 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listFieldsByModuleAndType.json -func ExampleFieldsClient_NewListByTypePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFieldsClient().NewListByTypePager("rg", "MyAutomationAccount", "MyModule", "MyCustomType", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TypeFieldListResult = armautomation.TypeFieldListResult{ - // Value: []*armautomation.TypeField{ - // { - // Name: to.Ptr("Name"), - // Type: to.Ptr("System.String"), - // }, - // { - // Name: to.Ptr("Id"), - // Type: to.Ptr("System.Integer"), - // }, - // { - // Name: to.Ptr("Details"), - // Type: to.Ptr("MyModule.AnotherCustomType"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/go.mod b/sdk/resourcemanager/automation/armautomation/go.mod index 815ce709e943..1e82248ea8db 100644 --- a/sdk/resourcemanager/automation/armautomation/go.mod +++ b/sdk/resourcemanager/automation/armautomation/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautom go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/text v0.8.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/automation/armautomation/go.sum b/sdk/resourcemanager/automation/armautomation/go.sum index 8ba445a8c4da..5c6bee428364 100644 --- a/sdk/resourcemanager/automation/armautomation/go.sum +++ b/sdk/resourcemanager/automation/armautomation/go.sum @@ -1,31 +1,15 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go b/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go index 2cfbaaea5bcc..708ba28fa6f6 100644 --- a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go +++ b/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewHybridRunbookWorkerGroupClient(subscriptionID string, credential azcore. // Create - Create a hybrid runbook worker group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name @@ -56,18 +55,21 @@ func NewHybridRunbookWorkerGroupClient(subscriptionID string, credential azcore. // - options - HybridRunbookWorkerGroupClientCreateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Create // method. func (client *HybridRunbookWorkerGroupClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerGroupCreationParameters HybridRunbookWorkerGroupCreateOrUpdateParameters, options *HybridRunbookWorkerGroupClientCreateOptions) (HybridRunbookWorkerGroupClientCreateResponse, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerGroupCreationParameters, options) if err != nil { return HybridRunbookWorkerGroupClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -94,10 +96,13 @@ func (client *HybridRunbookWorkerGroupClient) createCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupCreationParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupCreationParameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -112,23 +117,25 @@ func (client *HybridRunbookWorkerGroupClient) createHandleResponse(resp *http.Re // Delete - Delete a hybrid runbook worker group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name // - options - HybridRunbookWorkerGroupClientDeleteOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Delete // method. func (client *HybridRunbookWorkerGroupClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, options *HybridRunbookWorkerGroupClientDeleteOptions) (HybridRunbookWorkerGroupClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) if err != nil { return HybridRunbookWorkerGroupClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientDeleteResponse{}, err } return HybridRunbookWorkerGroupClientDeleteResponse{}, nil } @@ -157,7 +164,7 @@ func (client *HybridRunbookWorkerGroupClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,25 +173,28 @@ func (client *HybridRunbookWorkerGroupClient) deleteCreateRequest(ctx context.Co // Get - Retrieve a hybrid runbook worker group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name // - options - HybridRunbookWorkerGroupClientGetOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Get // method. func (client *HybridRunbookWorkerGroupClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, options *HybridRunbookWorkerGroupClientGetOptions) (HybridRunbookWorkerGroupClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, options) if err != nil { return HybridRunbookWorkerGroupClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -211,7 +221,7 @@ func (client *HybridRunbookWorkerGroupClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,7 +238,7 @@ func (client *HybridRunbookWorkerGroupClient) getHandleResponse(resp *http.Respo // NewListByAutomationAccountPager - Retrieve a list of hybrid runbook worker groups. // -// Generated from API version 2022-02-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - HybridRunbookWorkerGroupClientListByAutomationAccountOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager @@ -284,7 +294,7 @@ func (client *HybridRunbookWorkerGroupClient) listByAutomationAccountCreateReque if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2022-02-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +312,7 @@ func (client *HybridRunbookWorkerGroupClient) listByAutomationAccountHandleRespo // Update - Update a hybrid runbook worker group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-02-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name @@ -310,18 +320,21 @@ func (client *HybridRunbookWorkerGroupClient) listByAutomationAccountHandleRespo // - options - HybridRunbookWorkerGroupClientUpdateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Update // method. func (client *HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerGroupUpdationParameters HybridRunbookWorkerGroupCreateOrUpdateParameters, options *HybridRunbookWorkerGroupClientUpdateOptions) (HybridRunbookWorkerGroupClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerGroupUpdationParameters, options) if err != nil { return HybridRunbookWorkerGroupClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkerGroupClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkerGroupClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkerGroupClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -348,10 +361,13 @@ func (client *HybridRunbookWorkerGroupClient) updateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupUpdationParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerGroupUpdationParameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client_example_test.go b/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client_example_test.go deleted file mode 100644 index 12e929156b18..000000000000 --- a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkergroup_client_example_test.go +++ /dev/null @@ -1,209 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/deleteHybridRunbookWorkerGroup.json -func ExampleHybridRunbookWorkerGroupClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewHybridRunbookWorkerGroupClient().Delete(ctx, "rg", "myAutomationAccount20", "myGroup", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/getHybridRunbookWorkerGroup.json -func ExampleHybridRunbookWorkerGroupClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHybridRunbookWorkerGroupClient().Get(ctx, "rg", "testaccount", "TestHybridGroup", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HybridRunbookWorkerGroup = armautomation.HybridRunbookWorkerGroup{ - // Name: to.Ptr("TestHybridGroup"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/HybridRunbookWorkerGroups"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup"), - // Properties: &armautomation.HybridRunbookWorkerGroupProperties{ - // Credential: &armautomation.RunAsCredentialAssociationProperty{ - // Name: to.Ptr("myRunAsCredentialName"), - // }, - // GroupType: to.Ptr(armautomation.GroupTypeEnumUser), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/putHybridRunbookWorkerGroup.json -func ExampleHybridRunbookWorkerGroupClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHybridRunbookWorkerGroupClient().Create(ctx, "rg", "testaccount", "TestHybridGroup", armautomation.HybridRunbookWorkerGroupCreateOrUpdateParameters{ - Properties: &armautomation.HybridRunbookWorkerGroupCreateOrUpdateProperties{ - Credential: &armautomation.RunAsCredentialAssociationProperty{ - Name: to.Ptr("myRunAsCredentialName"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HybridRunbookWorkerGroup = armautomation.HybridRunbookWorkerGroup{ - // Name: to.Ptr("TestHybridGroup"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup"), - // Properties: &armautomation.HybridRunbookWorkerGroupProperties{ - // Credential: &armautomation.RunAsCredentialAssociationProperty{ - // Name: to.Ptr("myRunAsCredentialName"), - // }, - // GroupType: to.Ptr(armautomation.GroupTypeEnumUser), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/updateHybridRunbookWorkerGroup.json -func ExampleHybridRunbookWorkerGroupClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHybridRunbookWorkerGroupClient().Update(ctx, "rg", "testaccount", "TestHybridGroup", armautomation.HybridRunbookWorkerGroupCreateOrUpdateParameters{ - Properties: &armautomation.HybridRunbookWorkerGroupCreateOrUpdateProperties{ - Credential: &armautomation.RunAsCredentialAssociationProperty{ - Name: to.Ptr("myRunAsCredentialUpdatedName"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HybridRunbookWorkerGroup = armautomation.HybridRunbookWorkerGroup{ - // Name: to.Ptr("TestHybridGroup"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup"), - // Properties: &armautomation.HybridRunbookWorkerGroupProperties{ - // Credential: &armautomation.RunAsCredentialAssociationProperty{ - // Name: to.Ptr("myRunAsCredentialUpdatedName"), - // }, - // GroupType: to.Ptr(armautomation.GroupTypeEnumUser), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/listHybridRunbookWorkerGroup.json -func ExampleHybridRunbookWorkerGroupClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewHybridRunbookWorkerGroupClient().NewListByAutomationAccountPager("rg", "testaccount", &armautomation.HybridRunbookWorkerGroupClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.HybridRunbookWorkerGroupsListResult = armautomation.HybridRunbookWorkerGroupsListResult{ - // Value: []*armautomation.HybridRunbookWorkerGroup{ - // { - // Name: to.Ptr("TestHybridGroup"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup"), - // Properties: &armautomation.HybridRunbookWorkerGroupProperties{ - // Credential: &armautomation.RunAsCredentialAssociationProperty{ - // Name: to.Ptr("myRunAsCredentialName"), - // }, - // GroupType: to.Ptr(armautomation.GroupTypeEnumUser), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go b/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go index cf90de76f6a3..d4bd55dd8580 100644 --- a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go +++ b/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewHybridRunbookWorkersClient(subscriptionID string, credential azcore.Toke // Create - Create a hybrid runbook worker. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name @@ -57,18 +56,21 @@ func NewHybridRunbookWorkersClient(subscriptionID string, credential azcore.Toke // - options - HybridRunbookWorkersClientCreateOptions contains the optional parameters for the HybridRunbookWorkersClient.Create // method. func (client *HybridRunbookWorkersClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, hybridRunbookWorkerCreationParameters HybridRunbookWorkerCreateParameters, options *HybridRunbookWorkersClientCreateOptions) (HybridRunbookWorkersClientCreateResponse, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, hybridRunbookWorkerCreationParameters, options) if err != nil { return HybridRunbookWorkersClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkersClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -99,10 +101,13 @@ func (client *HybridRunbookWorkersClient) createCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerCreationParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerCreationParameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -117,7 +122,7 @@ func (client *HybridRunbookWorkersClient) createHandleResponse(resp *http.Respon // Delete - Delete a hybrid runbook worker. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name @@ -125,16 +130,18 @@ func (client *HybridRunbookWorkersClient) createHandleResponse(resp *http.Respon // - options - HybridRunbookWorkersClientDeleteOptions contains the optional parameters for the HybridRunbookWorkersClient.Delete // method. func (client *HybridRunbookWorkersClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, options *HybridRunbookWorkersClientDeleteOptions) (HybridRunbookWorkersClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, options) if err != nil { return HybridRunbookWorkersClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return HybridRunbookWorkersClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientDeleteResponse{}, err } return HybridRunbookWorkersClientDeleteResponse{}, nil } @@ -167,7 +174,7 @@ func (client *HybridRunbookWorkersClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -176,7 +183,7 @@ func (client *HybridRunbookWorkersClient) deleteCreateRequest(ctx context.Contex // Get - Retrieve a hybrid runbook worker. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name @@ -184,18 +191,21 @@ func (client *HybridRunbookWorkersClient) deleteCreateRequest(ctx context.Contex // - options - HybridRunbookWorkersClientGetOptions contains the optional parameters for the HybridRunbookWorkersClient.Get // method. func (client *HybridRunbookWorkersClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, options *HybridRunbookWorkersClientGetOptions) (HybridRunbookWorkersClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, options) if err != nil { return HybridRunbookWorkersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -226,7 +236,7 @@ func (client *HybridRunbookWorkersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +253,7 @@ func (client *HybridRunbookWorkersClient) getHandleResponse(resp *http.Response) // NewListByHybridRunbookWorkerGroupPager - Retrieve a list of hybrid runbook workers. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name @@ -304,7 +314,7 @@ func (client *HybridRunbookWorkersClient) listByHybridRunbookWorkerGroupCreateRe if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +332,7 @@ func (client *HybridRunbookWorkersClient) listByHybridRunbookWorkerGroupHandleRe // Move - Move a hybrid worker to a different group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - hybridRunbookWorkerGroupName - The hybrid runbook worker group name @@ -331,16 +341,18 @@ func (client *HybridRunbookWorkersClient) listByHybridRunbookWorkerGroupHandleRe // - options - HybridRunbookWorkersClientMoveOptions contains the optional parameters for the HybridRunbookWorkersClient.Move // method. func (client *HybridRunbookWorkersClient) Move(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, hybridRunbookWorkerID string, hybridRunbookWorkerMoveParameters HybridRunbookWorkerMoveParameters, options *HybridRunbookWorkersClientMoveOptions) (HybridRunbookWorkersClientMoveResponse, error) { + var err error req, err := client.moveCreateRequest(ctx, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerID, hybridRunbookWorkerMoveParameters, options) if err != nil { return HybridRunbookWorkersClientMoveResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return HybridRunbookWorkersClientMoveResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HybridRunbookWorkersClientMoveResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HybridRunbookWorkersClientMoveResponse{}, err } return HybridRunbookWorkersClientMoveResponse{}, nil } @@ -373,8 +385,11 @@ func (client *HybridRunbookWorkersClient) moveCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hybridRunbookWorkerMoveParameters) + if err := runtime.MarshalAsJSON(req, hybridRunbookWorkerMoveParameters); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client_example_test.go b/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client_example_test.go deleted file mode 100644 index a82c7fe462f2..000000000000 --- a/sdk/resourcemanager/automation/armautomation/hybridrunbookworkers_client_example_test.go +++ /dev/null @@ -1,211 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/deleteHybridRunbookWorker.json -func ExampleHybridRunbookWorkersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewHybridRunbookWorkersClient().Delete(ctx, "rg", "myAutomationAccount20", "myGroup", "c010ad12-ef14-4a2a-aa9e-ef22c4745ddd", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getHybridRunbookWorker.json -func ExampleHybridRunbookWorkersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHybridRunbookWorkersClient().Get(ctx, "rg", "testaccount", "TestHybridGroup", "c010ad12-ef14-4a2a-aa9e-ef22c4745ddd", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HybridRunbookWorker = armautomation.HybridRunbookWorker{ - // Name: to.Ptr("c010ad12-ef14-4a2a-aa9e-ef22c4745ddd"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/HybridRunbookWorkerGroups/HybridRunbookWorkers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup/hybridRunbookWorkers/c010ad12-ef14-4a2a-aa9e-ef22c4745ddd"), - // Properties: &armautomation.HybridRunbookWorkerProperties{ - // IP: to.Ptr("10.0.0.0"), - // LastSeenDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // RegisteredDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // VMResourceID: to.Ptr("/subscriptions/vmsubid/resourceGroups/vmrg/providers/Microsoft.Compute/virtualMachines/vmname"), - // WorkerName: to.Ptr("vmname"), - // WorkerType: to.Ptr(armautomation.WorkerTypeHybridV2), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/putHybridRunbookWorker.json -func ExampleHybridRunbookWorkersClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewHybridRunbookWorkersClient().Create(ctx, "rg", "testaccount", "TestHybridGroup", "c010ad12-ef14-4a2a-aa9e-ef22c4745ddd", armautomation.HybridRunbookWorkerCreateParameters{ - Properties: &armautomation.HybridRunbookWorkerCreateOrUpdateParameters{ - VMResourceID: to.Ptr("/subscriptions/vmsubid/resourceGroups/vmrg/providers/Microsoft.Compute/virtualMachines/vmname"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HybridRunbookWorker = armautomation.HybridRunbookWorker{ - // Name: to.Ptr("c010ad12-ef14-4a2a-aa9e-ef22c4745ddd"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/HybridRunbookWorkerGroups/HybridRunbookWorkers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup/hybridRunbookWorkers/c010ad12-ef14-4a2a-aa9e-ef22c4745ddd"), - // Properties: &armautomation.HybridRunbookWorkerProperties{ - // IP: to.Ptr("10.0.0.0"), - // LastSeenDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // RegisteredDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // VMResourceID: to.Ptr("/subscriptions/vmsubid/resourceGroups/vmrg/providers/Microsoft.Compute/virtualMachines/vmname"), - // WorkerName: to.Ptr("vmname"), - // WorkerType: to.Ptr(armautomation.WorkerTypeHybridV2), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/moveHybridRunbookWorker.json -func ExampleHybridRunbookWorkersClient_Move() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewHybridRunbookWorkersClient().Move(ctx, "rg", "testaccount", "TestHybridGroup", "c010ad12-ef14-4a2a-aa9e-ef22c4745ddd", armautomation.HybridRunbookWorkerMoveParameters{ - HybridRunbookWorkerGroupName: to.Ptr("TestHybridGroup2"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listHybridRunbookWorker.json -func ExampleHybridRunbookWorkersClient_NewListByHybridRunbookWorkerGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewHybridRunbookWorkersClient().NewListByHybridRunbookWorkerGroupPager("rg", "testaccount", "TestHybridGroup", &armautomation.HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.HybridRunbookWorkersListResult = armautomation.HybridRunbookWorkersListResult{ - // Value: []*armautomation.HybridRunbookWorker{ - // { - // Name: to.Ptr("c010ad12-ef14-4a2a-aa9e-ef22c4745ddd"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/HybridRunbookWorkerGroups/HybridRunbookWorkers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup/hybridRunbookWorkers/c010ad12-ef14-4a2a-aa9e-ef22c4745ddd"), - // Properties: &armautomation.HybridRunbookWorkerProperties{ - // IP: to.Ptr("10.0.0.0"), - // LastSeenDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // RegisteredDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // VMResourceID: to.Ptr("/subscriptions/vmsubid/resourceGroups/vmrg/providers/Microsoft.Compute/virtualMachines/vmname"), - // WorkerName: to.Ptr("vmname"), - // WorkerType: to.Ptr(armautomation.WorkerTypeHybridV2), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // }, - // { - // Name: to.Ptr("e18fe971-75b1-4351-987f-6fe3604bc721"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/HybridRunbookWorkerGroups/HybridRunbookWorkers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup/hybridRunbookWorkers/e18fe971-75b1-4351-987f-6fe3604bc721"), - // Properties: &armautomation.HybridRunbookWorkerProperties{ - // IP: to.Ptr("10.0.0.1"), - // LastSeenDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-25T16:30:55+00:00"); return t}()), - // RegisteredDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-25T16:30:55+00:00"); return t}()), - // VMResourceID: to.Ptr(""), - // WorkerName: to.Ptr("myworker"), - // WorkerType: to.Ptr(armautomation.WorkerTypeHybridV1), - // }, - // SystemData: &armautomation.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // CreatedBy: to.Ptr("foo@contoso.com"), - // CreatedByType: to.Ptr(armautomation.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-24T16:30:55+00:00"); return t}()), - // LastModifiedBy: to.Ptr("foo@contoso.com"), - // LastModifiedByType: to.Ptr(armautomation.CreatedByTypeUser), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/job_client.go b/sdk/resourcemanager/automation/armautomation/job_client.go index a0506478f3e3..56adc62a3e82 100644 --- a/sdk/resourcemanager/automation/armautomation/job_client.go +++ b/sdk/resourcemanager/automation/armautomation/job_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewJobClient(subscriptionID string, credential azcore.TokenCredential, opti // Create - Create a job of the runbook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. // - parameters - The parameters supplied to the create job operation. // - options - JobClientCreateOptions contains the optional parameters for the JobClient.Create method. func (client *JobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, parameters JobCreateParameters, options *JobClientCreateOptions) (JobClientCreateResponse, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, parameters, options) if err != nil { return JobClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return JobClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -93,13 +95,16 @@ func (client *JobClient) createCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -114,24 +119,27 @@ func (client *JobClient) createHandleResponse(resp *http.Response) (JobClientCre // Get - Retrieve the job identified by job name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. // - options - JobClientGetOptions contains the optional parameters for the JobClient.Get method. func (client *JobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientGetOptions) (JobClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -158,7 +166,7 @@ func (client *JobClient) getCreateRequest(ctx context.Context, resourceGroupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -179,24 +187,27 @@ func (client *JobClient) getHandleResponse(resp *http.Response) (JobClientGetRes // GetOutput - Retrieve the job output identified by job name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The name of the job to be created. // - options - JobClientGetOutputOptions contains the optional parameters for the JobClient.GetOutput method. func (client *JobClient) GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientGetOutputOptions) (JobClientGetOutputResponse, error) { + var err error req, err := client.getOutputCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientGetOutputResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientGetOutputResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientGetOutputResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientGetOutputResponse{}, err } - return client.getOutputHandleResponse(resp) + resp, err := client.getOutputHandleResponse(httpResp) + return resp, err } // getOutputCreateRequest creates the GetOutput request. @@ -223,7 +234,7 @@ func (client *JobClient) getOutputCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -247,24 +258,27 @@ func (client *JobClient) getOutputHandleResponse(resp *http.Response) (JobClient // GetRunbookContent - Retrieve the runbook content of the job identified by job name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. // - options - JobClientGetRunbookContentOptions contains the optional parameters for the JobClient.GetRunbookContent method. func (client *JobClient) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientGetRunbookContentOptions) (JobClientGetRunbookContentResponse, error) { + var err error req, err := client.getRunbookContentCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientGetRunbookContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientGetRunbookContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientGetRunbookContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientGetRunbookContentResponse{}, err } - return client.getRunbookContentHandleResponse(resp) + resp, err := client.getRunbookContentHandleResponse(httpResp) + return resp, err } // getRunbookContentCreateRequest creates the GetRunbookContent request. @@ -291,7 +305,7 @@ func (client *JobClient) getRunbookContentCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -314,7 +328,7 @@ func (client *JobClient) getRunbookContentHandleResponse(resp *http.Response) (J // NewListByAutomationAccountPager - Retrieve a list of jobs. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - JobClientListByAutomationAccountOptions contains the optional parameters for the JobClient.NewListByAutomationAccountPager @@ -370,7 +384,7 @@ func (client *JobClient) listByAutomationAccountCreateRequest(ctx context.Contex if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -391,22 +405,24 @@ func (client *JobClient) listByAutomationAccountHandleResponse(resp *http.Respon // Resume - Resume the job identified by jobName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. // - options - JobClientResumeOptions contains the optional parameters for the JobClient.Resume method. func (client *JobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientResumeOptions) (JobClientResumeResponse, error) { + var err error req, err := client.resumeCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientResumeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientResumeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientResumeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientResumeResponse{}, err } return JobClientResumeResponse{}, nil } @@ -435,7 +451,7 @@ func (client *JobClient) resumeCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -447,22 +463,24 @@ func (client *JobClient) resumeCreateRequest(ctx context.Context, resourceGroupN // Stop - Stop the job identified by jobName. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. // - options - JobClientStopOptions contains the optional parameters for the JobClient.Stop method. func (client *JobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientStopOptions) (JobClientStopResponse, error) { + var err error req, err := client.stopCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientStopResponse{}, err } return JobClientStopResponse{}, nil } @@ -491,7 +509,7 @@ func (client *JobClient) stopCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -503,22 +521,24 @@ func (client *JobClient) stopCreateRequest(ctx context.Context, resourceGroupNam // Suspend - Suspend the job identified by job name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. // - options - JobClientSuspendOptions contains the optional parameters for the JobClient.Suspend method. func (client *JobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, options *JobClientSuspendOptions) (JobClientSuspendResponse, error) { + var err error req, err := client.suspendCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, options) if err != nil { return JobClientSuspendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobClientSuspendResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobClientSuspendResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobClientSuspendResponse{}, err } return JobClientSuspendResponse{}, nil } @@ -547,7 +567,7 @@ func (client *JobClient) suspendCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} diff --git a/sdk/resourcemanager/automation/armautomation/job_client_example_test.go b/sdk/resourcemanager/automation/armautomation/job_client_example_test.go deleted file mode 100644 index dd0a765c7b87..000000000000 --- a/sdk/resourcemanager/automation/armautomation/job_client_example_test.go +++ /dev/null @@ -1,244 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJobOutput.json -func ExampleJobClient_GetOutput() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobClient().GetOutput(ctx, "mygroup", "ContoseAutomationAccount", "foo", &armautomation.JobClientGetOutputOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Value = "Wednesday, February 7, 2018 3:47:17 PM" -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJobRunbookContent.json -func ExampleJobClient_GetRunbookContent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobClient().GetRunbookContent(ctx, "mygroup", "ContoseAutomationAccount", "foo", &armautomation.JobClientGetRunbookContentOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Value = "get-date" -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/suspendJob.json -func ExampleJobClient_Suspend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobClient().Suspend(ctx, "mygroup", "ContoseAutomationAccount", "foo", &armautomation.JobClientSuspendOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/stopJob.json -func ExampleJobClient_Stop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobClient().Stop(ctx, "mygroup", "ContoseAutomationAccount", "foo", &armautomation.JobClientStopOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJob.json -func ExampleJobClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobClient().Get(ctx, "mygroup", "ContoseAutomationAccount", "foo", &armautomation.JobClientGetOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Job = armautomation.Job{ - // Name: to.Ptr("foo"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Jobs"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName"), - // Properties: &armautomation.JobProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T05:53:30.243+00:00"); return t}()), - // JobID: to.Ptr("5b8a3960-e8ab-45f6-bec6-567df8467d1a"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T05:53:30.243+00:00"); return t}()), - // LastStatusModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T05:53:30.243+00:00"); return t}()), - // Parameters: map[string]*string{ - // "tag01": to.Ptr("value01"), - // "tag02": to.Ptr("value02"), - // }, - // ProvisioningState: to.Ptr(armautomation.JobProvisioningStateSucceeded), - // RunOn: to.Ptr(""), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // Status: to.Ptr(armautomation.JobStatusNew), - // StatusDetails: to.Ptr("None"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/createJob.json -func ExampleJobClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobClient().Create(ctx, "mygroup", "ContoseAutomationAccount", "foo", armautomation.JobCreateParameters{ - Properties: &armautomation.JobCreateProperties{ - Parameters: map[string]*string{ - "key01": to.Ptr("value01"), - "key02": to.Ptr("value02"), - }, - RunOn: to.Ptr(""), - Runbook: &armautomation.RunbookAssociationProperty{ - Name: to.Ptr("TestRunbook"), - }, - }, - }, &armautomation.JobClientCreateOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/listJobsByAutomationAccount.json -func ExampleJobClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobClient().NewListByAutomationAccountPager("mygroup", "ContoseAutomationAccount", &armautomation.JobClientListByAutomationAccountOptions{Filter: nil, - ClientRequestID: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.JobListResultV2 = armautomation.JobListResultV2{ - // Value: []*armautomation.JobCollectionItem{ - // { - // Name: to.Ptr("job1"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Jobs"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/job1"), - // Properties: &armautomation.JobCollectionItemProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T05:53:30.243+00:00"); return t}()), - // JobID: to.Ptr("45203a94-a8cb-47c3-8ce4-4dcc3a5f7d23"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T05:53:30.243+00:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // Status: to.Ptr(armautomation.JobStatusNew), - // }, - // }, - // { - // Name: to.Ptr("job2"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Jobs"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/job2"), - // Properties: &armautomation.JobCollectionItemProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T05:46:49.37+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T05:48:38.857+00:00"); return t}()), - // JobID: to.Ptr("7584055f-5118-460a-a2dd-5176c9c8efe9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T05:48:38.857+00:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T05:47:35.2+00:00"); return t}()), - // Status: to.Ptr(armautomation.JobStatusCompleted), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/resumeJob.json -func ExampleJobClient_Resume() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobClient().Resume(ctx, "mygroup", "ContoseAutomationAccount", "foo", &armautomation.JobClientResumeOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/automation/armautomation/jobschedule_client.go b/sdk/resourcemanager/automation/armautomation/jobschedule_client.go index e76f81931372..10180e8dafaf 100644 --- a/sdk/resourcemanager/automation/armautomation/jobschedule_client.go +++ b/sdk/resourcemanager/automation/armautomation/jobschedule_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewJobScheduleClient(subscriptionID string, credential azcore.TokenCredenti // Create - Create a job schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobScheduleID - The job schedule name. // - parameters - The parameters supplied to the create job schedule operation. // - options - JobScheduleClientCreateOptions contains the optional parameters for the JobScheduleClient.Create method. func (client *JobScheduleClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID string, parameters JobScheduleCreateParameters, options *JobScheduleClientCreateOptions) (JobScheduleClientCreateResponse, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, jobScheduleID, parameters, options) if err != nil { return JobScheduleClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobScheduleClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return JobScheduleClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return JobScheduleClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -90,10 +92,13 @@ func (client *JobScheduleClient) createCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -108,22 +113,24 @@ func (client *JobScheduleClient) createHandleResponse(resp *http.Response) (JobS // Delete - Delete the job schedule identified by job schedule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobScheduleID - The job schedule name. // - options - JobScheduleClientDeleteOptions contains the optional parameters for the JobScheduleClient.Delete method. func (client *JobScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID string, options *JobScheduleClientDeleteOptions) (JobScheduleClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, jobScheduleID, options) if err != nil { return JobScheduleClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobScheduleClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobScheduleClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobScheduleClientDeleteResponse{}, err } return JobScheduleClientDeleteResponse{}, nil } @@ -149,7 +156,7 @@ func (client *JobScheduleClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -158,24 +165,27 @@ func (client *JobScheduleClient) deleteCreateRequest(ctx context.Context, resour // Get - Retrieve the job schedule identified by job schedule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobScheduleID - The job schedule name. // - options - JobScheduleClientGetOptions contains the optional parameters for the JobScheduleClient.Get method. func (client *JobScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID string, options *JobScheduleClientGetOptions) (JobScheduleClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, jobScheduleID, options) if err != nil { return JobScheduleClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobScheduleClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobScheduleClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobScheduleClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -199,7 +209,7 @@ func (client *JobScheduleClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -216,7 +226,7 @@ func (client *JobScheduleClient) getHandleResponse(resp *http.Response) (JobSche // NewListByAutomationAccountPager - Retrieve a list of job schedules. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - JobScheduleClientListByAutomationAccountOptions contains the optional parameters for the JobScheduleClient.NewListByAutomationAccountPager @@ -272,7 +282,7 @@ func (client *JobScheduleClient) listByAutomationAccountCreateRequest(ctx contex if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/jobschedule_client_example_test.go b/sdk/resourcemanager/automation/armautomation/jobschedule_client_example_test.go deleted file mode 100644 index b246ba8dd650..000000000000 --- a/sdk/resourcemanager/automation/armautomation/jobschedule_client_example_test.go +++ /dev/null @@ -1,166 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteJobSchedule.json -func ExampleJobScheduleClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobScheduleClient().Delete(ctx, "rg", "ContoseAutomationAccount", "0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getJobSchedule.json -func ExampleJobScheduleClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobScheduleClient().Get(ctx, "rg", "ContoseAutomationAccount", "0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobSchedule = armautomation.JobSchedule{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobSchedules/0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc"), - // Properties: &armautomation.JobScheduleProperties{ - // JobScheduleID: to.Ptr("0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc"), - // Parameters: map[string]*string{ - // "jobscheduletag01": to.Ptr("jobschedulevalue01"), - // "jobscheduletag02": to.Ptr("jobschedulevalue02"), - // }, - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // Schedule: &armautomation.ScheduleAssociationProperty{ - // Name: to.Ptr("ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createJobSchedule.json -func ExampleJobScheduleClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewJobScheduleClient().Create(ctx, "rg", "ContoseAutomationAccount", "0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc", armautomation.JobScheduleCreateParameters{ - Properties: &armautomation.JobScheduleCreateProperties{ - Parameters: map[string]*string{ - "jobscheduletag01": to.Ptr("jobschedulevalue01"), - "jobscheduletag02": to.Ptr("jobschedulevalue02"), - }, - Runbook: &armautomation.RunbookAssociationProperty{ - Name: to.Ptr("TestRunbook"), - }, - Schedule: &armautomation.ScheduleAssociationProperty{ - Name: to.Ptr("ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listAllJobSchedulesByAutomationAccount.json -func ExampleJobScheduleClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobScheduleClient().NewListByAutomationAccountPager("rg", "ContoseAutomationAccount", &armautomation.JobScheduleClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.JobScheduleListResult = armautomation.JobScheduleListResult{ - // Value: []*armautomation.JobSchedule{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobSchedules/2f4d8f35-ecd5-44ee-a019-2382fec58fb7"), - // Properties: &armautomation.JobScheduleProperties{ - // JobScheduleID: to.Ptr("2f4d8f35-ecd5-44ee-a019-2382fec58fb7"), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // Schedule: &armautomation.ScheduleAssociationProperty{ - // Name: to.Ptr("JobScheduleforTestRunbook"), - // }, - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobSchedules/446f7a33-86ff-45a1-b71c-f998f701b443"), - // Properties: &armautomation.JobScheduleProperties{ - // JobScheduleID: to.Ptr("446f7a33-86ff-45a1-b71c-f998f701b443"), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // Schedule: &armautomation.ScheduleAssociationProperty{ - // Name: to.Ptr("TestSchedule"), - // }, - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobSchedules/0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc"), - // Properties: &armautomation.JobScheduleProperties{ - // JobScheduleID: to.Ptr("0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc"), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // Schedule: &armautomation.ScheduleAssociationProperty{ - // Name: to.Ptr("ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2"), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/jobstream_client.go b/sdk/resourcemanager/automation/armautomation/jobstream_client.go index c6d494ec6a7d..bd6bcefdbe84 100644 --- a/sdk/resourcemanager/automation/armautomation/jobstream_client.go +++ b/sdk/resourcemanager/automation/armautomation/jobstream_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewJobStreamClient(subscriptionID string, credential azcore.TokenCredential // Get - Retrieve the job stream identified by job stream id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. // - jobStreamID - The job stream id. // - options - JobStreamClientGetOptions contains the optional parameters for the JobStreamClient.Get method. func (client *JobStreamClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobName string, jobStreamID string, options *JobStreamClientGetOptions) (JobStreamClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, jobName, jobStreamID, options) if err != nil { return JobStreamClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobStreamClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobStreamClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobStreamClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -97,7 +99,7 @@ func (client *JobStreamClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -117,7 +119,7 @@ func (client *JobStreamClient) getHandleResponse(resp *http.Response) (JobStream // NewListByJobPager - Retrieve a list of jobs streams identified by job name. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - jobName - The job name. @@ -177,7 +179,7 @@ func (client *JobStreamClient) listByJobCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} diff --git a/sdk/resourcemanager/automation/armautomation/jobstream_client_example_test.go b/sdk/resourcemanager/automation/armautomation/jobstream_client_example_test.go deleted file mode 100644 index 8f732f07d4be..000000000000 --- a/sdk/resourcemanager/automation/armautomation/jobstream_client_example_test.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJobStream.json -func ExampleJobStreamClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJobStreamClient().Get(ctx, "mygroup", "ContoseAutomationAccount", "foo", "851b2101-686f-40e2-8a4b-5b8df08afbd1_00636535684910693884_00000000000000000001", &armautomation.JobStreamClientGetOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobStream = armautomation.JobStream{ - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/851b2101-686f-40e2-8a4b-5b8df08afbd1_00636535684910693884_00000000000000000001"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("851b2101-686f-40e2-8a4b-5b8df08afbd1:00636535684910693884:00000000000000000001"), - // StreamText: to.Ptr(""), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-07T02:48:11.0693884+00:00"); return t}()), - // Value: map[string]any{ - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/listJobStreamsByJob.json -func ExampleJobStreamClient_NewListByJobPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJobStreamClient().NewListByJobPager("mygroup", "ContoseAutomationAccount", "foo", &armautomation.JobStreamClientListByJobOptions{Filter: nil, - ClientRequestID: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.JobStreamListResult = armautomation.JobStreamListResult{ - // Value: []*armautomation.JobStream{ - // { - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/24456a8a-2857-4af6-932c-3455f38bd05e_00636535675981232703_00000000000000000001"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("24456a8a-2857-4af6-932c-3455f38bd05e_00636535675981232703_00000000000000000001"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-07T02:33:18.1232703+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/24456a8a-2857-4af6-932c-3455f38bd05e_00636535675984691350_00000000000000000002"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("24456a8a-2857-4af6-932c-3455f38bd05e_00636535675984691350_00000000000000000002"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-07T02:33:18.469135+00:00"); return t}()), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/keys_client.go b/sdk/resourcemanager/automation/armautomation/keys_client.go index f0960bf5ccb2..34929f7e5276 100644 --- a/sdk/resourcemanager/automation/armautomation/keys_client.go +++ b/sdk/resourcemanager/automation/armautomation/keys_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,24 +47,27 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // ListByAutomationAccount - Retrieve the automation keys for an account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - KeysClientListByAutomationAccountOptions contains the optional parameters for the KeysClient.ListByAutomationAccount // method. func (client *KeysClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, options *KeysClientListByAutomationAccountOptions) (KeysClientListByAutomationAccountResponse, error) { + var err error req, err := client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return KeysClientListByAutomationAccountResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientListByAutomationAccountResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientListByAutomationAccountResponse{}, err } - return client.listByAutomationAccountHandleResponse(resp) + resp, err := client.listByAutomationAccountHandleResponse(httpResp) + return resp, err } // listByAutomationAccountCreateRequest creates the ListByAutomationAccount request. @@ -88,7 +90,7 @@ func (client *KeysClient) listByAutomationAccountCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/keys_client_example_test.go b/sdk/resourcemanager/automation/armautomation/keys_client_example_test.go deleted file mode 100644 index 37ecbaf6096f..000000000000 --- a/sdk/resourcemanager/automation/armautomation/keys_client_example_test.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listAutomationAccountKeys.json -func ExampleKeysClient_ListByAutomationAccount() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKeysClient().ListByAutomationAccount(ctx, "rg", "MyAutomationAccount", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KeyListResult = armautomation.KeyListResult{ - // Keys: []*armautomation.Key{ - // { - // KeyName: to.Ptr(armautomation.AutomationKeyNamePrimary), - // Permissions: to.Ptr(armautomation.AutomationKeyPermissionsFull), - // Value: to.Ptr("**************************************************************"), - // }, - // { - // KeyName: to.Ptr(armautomation.AutomationKeyNameSecondary), - // Permissions: to.Ptr(armautomation.AutomationKeyPermissionsFull), - // Value: to.Ptr("**************************************************************"), - // }}, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go b/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go index 2e66fe754165..726c87063a8f 100644 --- a/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go +++ b/sdk/resourcemanager/automation/armautomation/linkedworkspace_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,23 +47,26 @@ func NewLinkedWorkspaceClient(subscriptionID string, credential azcore.TokenCred // Get - Retrieve the linked workspace for the account id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - LinkedWorkspaceClientGetOptions contains the optional parameters for the LinkedWorkspaceClient.Get method. func (client *LinkedWorkspaceClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, options *LinkedWorkspaceClientGetOptions) (LinkedWorkspaceClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return LinkedWorkspaceClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LinkedWorkspaceClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LinkedWorkspaceClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LinkedWorkspaceClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -87,7 +89,7 @@ func (client *LinkedWorkspaceClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/linkedworkspace_client_example_test.go b/sdk/resourcemanager/automation/armautomation/linkedworkspace_client_example_test.go deleted file mode 100644 index dda3f0741119..000000000000 --- a/sdk/resourcemanager/automation/armautomation/linkedworkspace_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getLinkedWorkspace.json -func ExampleLinkedWorkspaceClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLinkedWorkspaceClient().Get(ctx, "rg", "ContosoAutomationAccount", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LinkedWorkspace = armautomation.LinkedWorkspace{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/ContosoWorkspace"), - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/models.go b/sdk/resourcemanager/automation/armautomation/models.go index fb4812adc67e..ebfa05c604e0 100644 --- a/sdk/resourcemanager/automation/armautomation/models.go +++ b/sdk/resourcemanager/automation/armautomation/models.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -41,37 +40,6 @@ type Account struct { Type *string } -// AccountClientCreateOrUpdateOptions contains the optional parameters for the AccountClient.CreateOrUpdate method. -type AccountClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AccountClientDeleteOptions contains the optional parameters for the AccountClient.Delete method. -type AccountClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. -type AccountClientGetOptions struct { - // placeholder for future optional parameters -} - -// AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager -// method. -type AccountClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method. -type AccountClientListOptions struct { - // placeholder for future optional parameters -} - -// AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method. -type AccountClientUpdateOptions struct { - // placeholder for future optional parameters -} - // AccountCreateOrUpdateParameters - The parameters supplied to the create or update automation account operation. type AccountCreateOrUpdateParameters struct { // Sets the identity property for automation account @@ -195,16 +163,6 @@ type Activity struct { Name *string } -// ActivityClientGetOptions contains the optional parameters for the ActivityClient.Get method. -type ActivityClientGetOptions struct { - // placeholder for future optional parameters -} - -// ActivityClientListByModuleOptions contains the optional parameters for the ActivityClient.NewListByModulePager method. -type ActivityClientListByModuleOptions struct { - // placeholder for future optional parameters -} - // ActivityListResult - The response model for the list activity operation. type ActivityListResult struct { // Gets or sets the next link. @@ -335,18 +293,6 @@ type AgentRegistration struct { Keys *AgentRegistrationKeys } -// AgentRegistrationInformationClientGetOptions contains the optional parameters for the AgentRegistrationInformationClient.Get -// method. -type AgentRegistrationInformationClientGetOptions struct { - // placeholder for future optional parameters -} - -// AgentRegistrationInformationClientRegenerateKeyOptions contains the optional parameters for the AgentRegistrationInformationClient.RegenerateKey -// method. -type AgentRegistrationInformationClientRegenerateKeyOptions struct { - // placeholder for future optional parameters -} - // AgentRegistrationKeys - Definition of the agent registration keys. type AgentRegistrationKeys struct { // Gets or sets the primary key. @@ -389,32 +335,6 @@ type Certificate struct { Type *string } -// CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method. -type CertificateClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. -type CertificateClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. -type CertificateClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientListByAutomationAccountOptions contains the optional parameters for the CertificateClient.NewListByAutomationAccountPager -// method. -type CertificateClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method. -type CertificateClientUpdateOptions struct { - // placeholder for future optional parameters -} - // CertificateCreateOrUpdateParameters - The parameters supplied to the create or update or replace certificate operation. type CertificateCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the certificate. @@ -484,19 +404,6 @@ type CertificateUpdateProperties struct { Description *string } -// ClientConvertGraphRunbookContentOptions contains the optional parameters for the Client.ConvertGraphRunbookContent method. -type ClientConvertGraphRunbookContentOptions struct { - // placeholder for future optional parameters -} - -type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties struct { - // READ-ONLY; The client id of user assigned identity. - ClientID *string - - // READ-ONLY; The principal id of user assigned identity. - PrincipalID *string -} - // Connection - Definition of the connection. type Connection struct { // Gets or sets the properties of the connection. @@ -512,32 +419,6 @@ type Connection struct { Type *string } -// ConnectionClientCreateOrUpdateOptions contains the optional parameters for the ConnectionClient.CreateOrUpdate method. -type ConnectionClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientDeleteOptions contains the optional parameters for the ConnectionClient.Delete method. -type ConnectionClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientGetOptions contains the optional parameters for the ConnectionClient.Get method. -type ConnectionClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientListByAutomationAccountOptions contains the optional parameters for the ConnectionClient.NewListByAutomationAccountPager -// method. -type ConnectionClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// ConnectionClientUpdateOptions contains the optional parameters for the ConnectionClient.Update method. -type ConnectionClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ConnectionCreateOrUpdateParameters - The parameters supplied to the create or update connection operation. type ConnectionCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the connection. @@ -607,28 +488,6 @@ type ConnectionTypeAssociationProperty struct { Name *string } -// ConnectionTypeClientCreateOrUpdateOptions contains the optional parameters for the ConnectionTypeClient.CreateOrUpdate -// method. -type ConnectionTypeClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectionTypeClientDeleteOptions contains the optional parameters for the ConnectionTypeClient.Delete method. -type ConnectionTypeClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ConnectionTypeClientGetOptions contains the optional parameters for the ConnectionTypeClient.Get method. -type ConnectionTypeClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectionTypeClientListByAutomationAccountOptions contains the optional parameters for the ConnectionTypeClient.NewListByAutomationAccountPager -// method. -type ConnectionTypeClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - // ConnectionTypeCreateOrUpdateParameters - The parameters supplied to the create or update connection type operation. type ConnectionTypeCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the connection type. @@ -743,32 +602,6 @@ type Credential struct { Type *string } -// CredentialClientCreateOrUpdateOptions contains the optional parameters for the CredentialClient.CreateOrUpdate method. -type CredentialClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientDeleteOptions contains the optional parameters for the CredentialClient.Delete method. -type CredentialClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientGetOptions contains the optional parameters for the CredentialClient.Get method. -type CredentialClientGetOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientListByAutomationAccountOptions contains the optional parameters for the CredentialClient.NewListByAutomationAccountPager -// method. -type CredentialClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// CredentialClientUpdateOptions contains the optional parameters for the CredentialClient.Update method. -type CredentialClientUpdateOptions struct { - // placeholder for future optional parameters -} - // CredentialCreateOrUpdateParameters - The parameters supplied to the create or update credential operation. type CredentialCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the credential. @@ -874,10 +707,13 @@ type DeletedAutomationAccountProperties struct { DeletionTime *time.Time } -// DeletedAutomationAccountsClientListBySubscriptionOptions contains the optional parameters for the DeletedAutomationAccountsClient.ListBySubscription -// method. -type DeletedAutomationAccountsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters +// Dimension of the metric. +type Dimension struct { + // The display name of the dimension. + DisplayName *string + + // The name of the dimension. + Name *string } // DscCompilationJob - Definition of the Dsc Compilation job. @@ -895,30 +731,6 @@ type DscCompilationJob struct { Type *string } -// DscCompilationJobClientBeginCreateOptions contains the optional parameters for the DscCompilationJobClient.BeginCreate -// method. -type DscCompilationJobClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscCompilationJobClientGetOptions contains the optional parameters for the DscCompilationJobClient.Get method. -type DscCompilationJobClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscCompilationJobClientGetStreamOptions contains the optional parameters for the DscCompilationJobClient.GetStream method. -type DscCompilationJobClientGetStreamOptions struct { - // placeholder for future optional parameters -} - -// DscCompilationJobClientListByAutomationAccountOptions contains the optional parameters for the DscCompilationJobClient.NewListByAutomationAccountPager -// method. -type DscCompilationJobClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // DscCompilationJobCreateParameters - The parameters supplied to the create compilation job operation. type DscCompilationJobCreateParameters struct { // REQUIRED; Gets or sets the list of compilation job properties. @@ -1000,12 +812,6 @@ type DscCompilationJobProperties struct { StartedBy *string } -// DscCompilationJobStreamClientListByJobOptions contains the optional parameters for the DscCompilationJobStreamClient.ListByJob -// method. -type DscCompilationJobStreamClientListByJobOptions struct { - // placeholder for future optional parameters -} - // DscConfiguration - Definition of the configuration type. type DscConfiguration struct { // Gets or sets the etag of the resource. @@ -1036,60 +842,6 @@ type DscConfigurationAssociationProperty struct { Name *string } -// DscConfigurationClientCreateOrUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithJSON -// method. -type DscConfigurationClientCreateOrUpdateWithJSONOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientCreateOrUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithText -// method. -type DscConfigurationClientCreateOrUpdateWithTextOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientDeleteOptions contains the optional parameters for the DscConfigurationClient.Delete method. -type DscConfigurationClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientGetContentOptions contains the optional parameters for the DscConfigurationClient.GetContent method. -type DscConfigurationClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientGetOptions contains the optional parameters for the DscConfigurationClient.Get method. -type DscConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscConfigurationClient.NewListByAutomationAccountPager -// method. -type DscConfigurationClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string - // Return total rows. - Inlinecount *string - // The number of rows to skip. - Skip *int32 - // The number of rows to take. - Top *int32 -} - -// DscConfigurationClientUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.UpdateWithJSON -// method. -type DscConfigurationClientUpdateWithJSONOptions struct { - // The create or update parameters for configuration. - Parameters *DscConfigurationUpdateParameters -} - -// DscConfigurationClientUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.UpdateWithText -// method. -type DscConfigurationClientUpdateWithTextOptions struct { - // The create or update parameters for configuration. - Parameters *string -} - // DscConfigurationCreateOrUpdateParameters - The parameters supplied to the create or update configuration operation. type DscConfigurationCreateOrUpdateParameters struct { // REQUIRED; Gets or sets configuration create or update properties. @@ -1234,34 +986,6 @@ type DscNode struct { Type *string } -// DscNodeClientDeleteOptions contains the optional parameters for the DscNodeClient.Delete method. -type DscNodeClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DscNodeClientGetOptions contains the optional parameters for the DscNodeClient.Get method. -type DscNodeClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscNodeClientListByAutomationAccountOptions contains the optional parameters for the DscNodeClient.NewListByAutomationAccountPager -// method. -type DscNodeClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string - // Return total rows. - Inlinecount *string - // The number of rows to skip. - Skip *int32 - // The number of rows to take. - Top *int32 -} - -// DscNodeClientUpdateOptions contains the optional parameters for the DscNodeClient.Update method. -type DscNodeClientUpdateOptions struct { - // placeholder for future optional parameters -} - // DscNodeConfiguration - Definition of the dsc node configuration. type DscNodeConfiguration struct { // Gets or sets the configuration properties. @@ -1283,36 +1007,6 @@ type DscNodeConfigurationAssociationProperty struct { Name *string } -// DscNodeConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscNodeConfigurationClient.BeginCreateOrUpdate -// method. -type DscNodeConfigurationClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscNodeConfigurationClientDeleteOptions contains the optional parameters for the DscNodeConfigurationClient.Delete method. -type DscNodeConfigurationClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DscNodeConfigurationClientGetOptions contains the optional parameters for the DscNodeConfigurationClient.Get method. -type DscNodeConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscNodeConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscNodeConfigurationClient.NewListByAutomationAccountPager -// method. -type DscNodeConfigurationClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string - // Return total rows. - Inlinecount *string - // The number of rows to skip. - Skip *int32 - // The number of rows to take. - Top *int32 -} - // DscNodeConfigurationCreateOrUpdateParameters - The parameters supplied to the create or update node configuration operation. type DscNodeConfigurationCreateOrUpdateParameters struct { // Name of the node configuration. @@ -1606,11 +1300,6 @@ type FieldDefinition struct { IsOptional *bool } -// FieldsClientListByTypeOptions contains the optional parameters for the FieldsClient.NewListByTypePager method. -type FieldsClientListByTypeOptions struct { - // placeholder for future optional parameters -} - // GraphicalRunbookContent - Graphical Runbook Content type GraphicalRunbookContent struct { // Graphical Runbook content as JSON @@ -1671,36 +1360,6 @@ type HybridRunbookWorkerGroup struct { Type *string } -// HybridRunbookWorkerGroupClientCreateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Create -// method. -type HybridRunbookWorkerGroupClientCreateOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkerGroupClientDeleteOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Delete -// method. -type HybridRunbookWorkerGroupClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkerGroupClientGetOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Get method. -type HybridRunbookWorkerGroupClientGetOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkerGroupClientListByAutomationAccountOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager -// method. -type HybridRunbookWorkerGroupClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// HybridRunbookWorkerGroupClientUpdateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Update -// method. -type HybridRunbookWorkerGroupClientUpdateOptions struct { - // placeholder for future optional parameters -} - // HybridRunbookWorkerGroupCreateOrUpdateParameters - The parameters supplied to the create hybrid runbook worker group operation. type HybridRunbookWorkerGroupCreateOrUpdateParameters struct { // Gets or sets the name of the resource. @@ -1761,33 +1420,6 @@ type HybridRunbookWorkerProperties struct { WorkerType *WorkerType } -// HybridRunbookWorkersClientCreateOptions contains the optional parameters for the HybridRunbookWorkersClient.Create method. -type HybridRunbookWorkersClientCreateOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkersClientDeleteOptions contains the optional parameters for the HybridRunbookWorkersClient.Delete method. -type HybridRunbookWorkersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkersClientGetOptions contains the optional parameters for the HybridRunbookWorkersClient.Get method. -type HybridRunbookWorkersClientGetOptions struct { - // placeholder for future optional parameters -} - -// HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions contains the optional parameters for the HybridRunbookWorkersClient.NewListByHybridRunbookWorkerGroupPager -// method. -type HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// HybridRunbookWorkersClientMoveOptions contains the optional parameters for the HybridRunbookWorkersClient.Move method. -type HybridRunbookWorkersClientMoveOptions struct { - // placeholder for future optional parameters -} - // HybridRunbookWorkersListResult - The response model for the list hybrid runbook workers. type HybridRunbookWorkersListResult struct { // Gets or sets the next link. @@ -1805,7 +1437,7 @@ type Identity struct { // The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource // ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - UserAssignedIdentities map[string]*ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties + UserAssignedIdentities map[string]*UserAssignedIdentitiesProperties // READ-ONLY; The principal ID of resource identity. PrincipalID *string @@ -1829,57 +1461,6 @@ type Job struct { Type *string } -// JobClientCreateOptions contains the optional parameters for the JobClient.Create method. -type JobClientCreateOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientGetOptions contains the optional parameters for the JobClient.Get method. -type JobClientGetOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientGetOutputOptions contains the optional parameters for the JobClient.GetOutput method. -type JobClientGetOutputOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientGetRunbookContentOptions contains the optional parameters for the JobClient.GetRunbookContent method. -type JobClientGetRunbookContentOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientListByAutomationAccountOptions contains the optional parameters for the JobClient.NewListByAutomationAccountPager -// method. -type JobClientListByAutomationAccountOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. - Filter *string -} - -// JobClientResumeOptions contains the optional parameters for the JobClient.Resume method. -type JobClientResumeOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientStopOptions contains the optional parameters for the JobClient.Stop method. -type JobClientStopOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobClientSuspendOptions contains the optional parameters for the JobClient.Suspend method. -type JobClientSuspendOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - // JobCollectionItem - Job collection item properties. type JobCollectionItem struct { // REQUIRED; Job properties. @@ -2017,28 +1598,6 @@ type JobSchedule struct { Type *string } -// JobScheduleClientCreateOptions contains the optional parameters for the JobScheduleClient.Create method. -type JobScheduleClientCreateOptions struct { - // placeholder for future optional parameters -} - -// JobScheduleClientDeleteOptions contains the optional parameters for the JobScheduleClient.Delete method. -type JobScheduleClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// JobScheduleClientGetOptions contains the optional parameters for the JobScheduleClient.Get method. -type JobScheduleClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobScheduleClientListByAutomationAccountOptions contains the optional parameters for the JobScheduleClient.NewListByAutomationAccountPager -// method. -type JobScheduleClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // JobScheduleCreateParameters - The parameters supplied to the create job schedule operation. type JobScheduleCreateParameters struct { // REQUIRED; Gets or sets the list of job schedule properties. @@ -2096,20 +1655,6 @@ type JobStream struct { Properties *JobStreamProperties } -// JobStreamClientGetOptions contains the optional parameters for the JobStreamClient.Get method. -type JobStreamClientGetOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// JobStreamClientListByJobOptions contains the optional parameters for the JobStreamClient.NewListByJobPager method. -type JobStreamClientListByJobOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. - Filter *string -} - // JobStreamListResult - The response model for the list job stream operation. type JobStreamListResult struct { // Gets or sets the next link. @@ -2169,22 +1714,12 @@ type KeyVaultProperties struct { KeyvaultURI *string } -// KeysClientListByAutomationAccountOptions contains the optional parameters for the KeysClient.ListByAutomationAccount method. -type KeysClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - // LinkedWorkspace - Definition of the linked workspace. type LinkedWorkspace struct { // READ-ONLY; Gets the id of the linked workspace. ID *string } -// LinkedWorkspaceClientGetOptions contains the optional parameters for the LinkedWorkspaceClient.Get method. -type LinkedWorkspaceClientGetOptions struct { - // placeholder for future optional parameters -} - // LinuxProperties - Linux specific update configuration. type LinuxProperties struct { // packages excluded from the software update configuration. @@ -2200,6 +1735,39 @@ type LinuxProperties struct { RebootSetting *string } +// LogSpecification - Description of logging specification. +type LogSpecification struct { + // Duration of the blob. + BlobDuration *string + + // The display name of the specification. + DisplayName *string + + // The name of the specification. + Name *string +} + +// MetricSpecification - Description of metrics specification. +type MetricSpecification struct { + // The aggregation type. + AggregationType *string + + // List of dimensions. + Dimensions []*Dimension + + // The description of the metric. + DisplayDescription *string + + // The display name of the metric. + DisplayName *string + + // The name of the metric. + Name *string + + // Units the metric to be displayed in. + Unit *string +} + // Module - Definition of the module type. type Module struct { // Gets or sets the etag of the resource. @@ -2224,32 +1792,6 @@ type Module struct { Type *string } -// ModuleClientCreateOrUpdateOptions contains the optional parameters for the ModuleClient.CreateOrUpdate method. -type ModuleClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientDeleteOptions contains the optional parameters for the ModuleClient.Delete method. -type ModuleClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientGetOptions contains the optional parameters for the ModuleClient.Get method. -type ModuleClientGetOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientListByAutomationAccountOptions contains the optional parameters for the ModuleClient.NewListByAutomationAccountPager -// method. -type ModuleClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// ModuleClientUpdateOptions contains the optional parameters for the ModuleClient.Update method. -type ModuleClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ModuleCreateOrUpdateParameters - The parameters supplied to the create or update module operation. type ModuleCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the module create properties. @@ -2327,17 +1869,17 @@ type ModuleProperties struct { // ModuleUpdateParameters - The parameters supplied to the update module operation. type ModuleUpdateParameters struct { - // Gets or sets the location of the resource. - Location *string - - // Gets or sets name of the resource. - Name *string - // Gets or sets the module update properties. Properties *ModuleUpdateProperties // Gets or sets the tags attached to the resource. Tags map[string]*string + + // READ-ONLY; Gets or sets the location of the resource. + Location *string + + // READ-ONLY; Gets or sets name of the resource. + Name *string } // ModuleUpdateProperties - The parameters supplied to the update properties. @@ -2353,11 +1895,6 @@ type NodeCount struct { Properties *NodeCountProperties } -// NodeCountInformationClientGetOptions contains the optional parameters for the NodeCountInformationClient.Get method. -type NodeCountInformationClientGetOptions struct { - // placeholder for future optional parameters -} - type NodeCountProperties struct { // Gets the count for the name Count *int32 @@ -2372,22 +1909,6 @@ type NodeCounts struct { Value []*NodeCount } -// NodeReportsClientGetContentOptions contains the optional parameters for the NodeReportsClient.GetContent method. -type NodeReportsClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// NodeReportsClientGetOptions contains the optional parameters for the NodeReportsClient.Get method. -type NodeReportsClientGetOptions struct { - // placeholder for future optional parameters -} - -// NodeReportsClientListByNodeOptions contains the optional parameters for the NodeReportsClient.NewListByNodePager method. -type NodeReportsClientListByNodeOptions struct { - // The filter to apply on the operation. - Filter *string -} - // NonAzureQueryProperties - Non Azure query for the update configuration. type NonAzureQueryProperties struct { // Log Analytics Saved Search name. @@ -2397,18 +1918,6 @@ type NonAzureQueryProperties struct { WorkspaceID *string } -// ObjectDataTypesClientListFieldsByModuleAndTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByModuleAndTypePager -// method. -type ObjectDataTypesClientListFieldsByModuleAndTypeOptions struct { - // placeholder for future optional parameters -} - -// ObjectDataTypesClientListFieldsByTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByTypePager -// method. -type ObjectDataTypesClientListFieldsByTypeOptions struct { - // placeholder for future optional parameters -} - // Operation - Automation REST API operation type Operation struct { // Provider, Resource and Operation values @@ -2416,10 +1925,19 @@ type Operation struct { // Operation name: {provider}/{resource}/{operation} Name *string + + // Origin of the operation. + Origin *string + + // Operation properties format. + Properties *OperationPropertiesFormat } // OperationDisplay - Provider, Resource and Operation values type OperationDisplay struct { + // Description of the operation. + Description *string + // Operation type: Read, write, delete, etc. Operation *string @@ -2436,9 +1954,19 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters +// OperationPropertiesFormat - Description of operation properties format. +type OperationPropertiesFormat struct { + // Specification of the service. + ServiceSpecification *OperationPropertiesFormatServiceSpecification +} + +// OperationPropertiesFormatServiceSpecification - Specification of the service. +type OperationPropertiesFormatServiceSpecification struct { + // Operation log specification. + LogSpecifications []*LogSpecification + + // Operation service specification. + MetricSpecifications []*MetricSpecification } // PrivateEndpointConnection - A private endpoint connection @@ -2474,32 +2002,6 @@ type PrivateEndpointConnectionProperties struct { PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty } -// PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate -// method. -type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -type PrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListByAutomationAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByAutomationAccountPager -// method. -type PrivateEndpointConnectionsClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - // PrivateEndpointProperty - Private endpoint which the connection belongs to. type PrivateEndpointProperty struct { // Resource id of the private endpoint. @@ -2536,12 +2038,6 @@ type PrivateLinkResourceProperties struct { RequiredMembers []*string } -// PrivateLinkResourcesClientAutomationOptions contains the optional parameters for the PrivateLinkResourcesClient.NewAutomationPager -// method. -type PrivateLinkResourcesClientAutomationOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionStateProperty - Connection State of the Private Endpoint Connection. type PrivateLinkServiceConnectionStateProperty struct { // The private link service connection description. @@ -2566,33 +2062,6 @@ type ProxyResource struct { Type *string } -// Python2PackageClientCreateOrUpdateOptions contains the optional parameters for the Python2PackageClient.CreateOrUpdate -// method. -type Python2PackageClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientDeleteOptions contains the optional parameters for the Python2PackageClient.Delete method. -type Python2PackageClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientGetOptions contains the optional parameters for the Python2PackageClient.Get method. -type Python2PackageClientGetOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientListByAutomationAccountOptions contains the optional parameters for the Python2PackageClient.NewListByAutomationAccountPager -// method. -type Python2PackageClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// Python2PackageClientUpdateOptions contains the optional parameters for the Python2PackageClient.Update method. -type Python2PackageClientUpdateOptions struct { - // placeholder for future optional parameters -} - // PythonPackageCreateParameters - The parameters supplied to the create or update module operation. type PythonPackageCreateParameters struct { // REQUIRED; Gets or sets the module create properties. @@ -2674,43 +2143,6 @@ type RunbookAssociationProperty struct { Name *string } -// RunbookClientBeginPublishOptions contains the optional parameters for the RunbookClient.BeginPublish method. -type RunbookClientBeginPublishOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RunbookClientCreateOrUpdateOptions contains the optional parameters for the RunbookClient.CreateOrUpdate method. -type RunbookClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientDeleteOptions contains the optional parameters for the RunbookClient.Delete method. -type RunbookClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientGetContentOptions contains the optional parameters for the RunbookClient.GetContent method. -type RunbookClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientGetOptions contains the optional parameters for the RunbookClient.Get method. -type RunbookClientGetOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientListByAutomationAccountOptions contains the optional parameters for the RunbookClient.NewListByAutomationAccountPager -// method. -type RunbookClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// RunbookClientUpdateOptions contains the optional parameters for the RunbookClient.Update method. -type RunbookClientUpdateOptions struct { - // placeholder for future optional parameters -} - // RunbookCreateOrUpdateDraftParameters - The parameters supplied to the create or update runbook operation. type RunbookCreateOrUpdateDraftParameters struct { // REQUIRED; Content of the Runbook. @@ -2797,28 +2229,6 @@ type RunbookDraft struct { Parameters map[string]*RunbookParameter } -// RunbookDraftClientBeginReplaceContentOptions contains the optional parameters for the RunbookDraftClient.BeginReplaceContent -// method. -type RunbookDraftClientBeginReplaceContentOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RunbookDraftClientGetContentOptions contains the optional parameters for the RunbookDraftClient.GetContent method. -type RunbookDraftClientGetContentOptions struct { - // placeholder for future optional parameters -} - -// RunbookDraftClientGetOptions contains the optional parameters for the RunbookDraftClient.Get method. -type RunbookDraftClientGetOptions struct { - // placeholder for future optional parameters -} - -// RunbookDraftClientUndoEditOptions contains the optional parameters for the RunbookDraftClient.UndoEdit method. -type RunbookDraftClientUndoEditOptions struct { - // placeholder for future optional parameters -} - // RunbookDraftUndoEditResult - The response model for the undo edit runbook operation. type RunbookDraftUndoEditResult struct { RequestID *string @@ -3005,32 +2415,6 @@ type ScheduleAssociationProperty struct { Name *string } -// ScheduleClientCreateOrUpdateOptions contains the optional parameters for the ScheduleClient.CreateOrUpdate method. -type ScheduleClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientDeleteOptions contains the optional parameters for the ScheduleClient.Delete method. -type ScheduleClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientGetOptions contains the optional parameters for the ScheduleClient.Get method. -type ScheduleClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientListByAutomationAccountOptions contains the optional parameters for the ScheduleClient.NewListByAutomationAccountPager -// method. -type ScheduleClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// ScheduleClientUpdateOptions contains the optional parameters for the ScheduleClient.Update method. -type ScheduleClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ScheduleCreateOrUpdateParameters - The parameters supplied to the create or update schedule operation. type ScheduleCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the Schedule. @@ -3217,27 +2601,6 @@ type SoftwareUpdateConfigurationMachineRunListResult struct { Value []*SoftwareUpdateConfigurationMachineRun } -// SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.GetByID -// method. -type SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationMachineRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.List -// method. -type SoftwareUpdateConfigurationMachineRunsClientListOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', - // and 'properties/softwareUpdateConfiguration/name' - Filter *string - // number of entries you skip before returning results - Skip *string - // Maximum number of entries returned in the results collection - Top *string -} - // SoftwareUpdateConfigurationProperties - Software update configuration properties. type SoftwareUpdateConfigurationProperties struct { // REQUIRED; Schedule information for the Software update configuration @@ -3352,27 +2715,6 @@ type SoftwareUpdateConfigurationRunTasks struct { PreTask *SoftwareUpdateConfigurationRunTaskProperties } -// SoftwareUpdateConfigurationRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.GetByID -// method. -type SoftwareUpdateConfigurationRunsClientGetByIDOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.List -// method. -type SoftwareUpdateConfigurationRunsClientListOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', - // and 'properties/softwareUpdateConfiguration/name' - Filter *string - // Number of entries you skip before returning results - Skip *string - // Maximum number of entries returned in the results collection - Top *string -} - // SoftwareUpdateConfigurationTasks - Task properties of the software update configuration. type SoftwareUpdateConfigurationTasks struct { // Post task properties. @@ -3382,36 +2724,6 @@ type SoftwareUpdateConfigurationTasks struct { PreTask *TaskProperties } -// SoftwareUpdateConfigurationsClientCreateOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Create -// method. -type SoftwareUpdateConfigurationsClientCreateOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationsClientDeleteOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Delete -// method. -type SoftwareUpdateConfigurationsClientDeleteOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationsClientGetByNameOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.GetByName -// method. -type SoftwareUpdateConfigurationsClientGetByNameOptions struct { - // Identifies this specific client request. - ClientRequestID *string -} - -// SoftwareUpdateConfigurationsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.List -// method. -type SoftwareUpdateConfigurationsClientListOptions struct { - // Identifies this specific client request. - ClientRequestID *string - // The filter to apply on the operation. - Filter *string -} - // SourceControl - Definition of the source control. type SourceControl struct { // The properties of the source control. @@ -3427,33 +2739,6 @@ type SourceControl struct { Type *string } -// SourceControlClientCreateOrUpdateOptions contains the optional parameters for the SourceControlClient.CreateOrUpdate method. -type SourceControlClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SourceControlClientDeleteOptions contains the optional parameters for the SourceControlClient.Delete method. -type SourceControlClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SourceControlClientGetOptions contains the optional parameters for the SourceControlClient.Get method. -type SourceControlClientGetOptions struct { - // placeholder for future optional parameters -} - -// SourceControlClientListByAutomationAccountOptions contains the optional parameters for the SourceControlClient.NewListByAutomationAccountPager -// method. -type SourceControlClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// SourceControlClientUpdateOptions contains the optional parameters for the SourceControlClient.Update method. -type SourceControlClientUpdateOptions struct { - // placeholder for future optional parameters -} - // SourceControlCreateOrUpdateParameters - The parameters supplied to the create or update source control operation. type SourceControlCreateOrUpdateParameters struct { // REQUIRED; The properties of the source control. @@ -3585,23 +2870,6 @@ type SourceControlSyncJobByIDProperties struct { StartTime *time.Time } -// SourceControlSyncJobClientCreateOptions contains the optional parameters for the SourceControlSyncJobClient.Create method. -type SourceControlSyncJobClientCreateOptions struct { - // placeholder for future optional parameters -} - -// SourceControlSyncJobClientGetOptions contains the optional parameters for the SourceControlSyncJobClient.Get method. -type SourceControlSyncJobClientGetOptions struct { - // placeholder for future optional parameters -} - -// SourceControlSyncJobClientListByAutomationAccountOptions contains the optional parameters for the SourceControlSyncJobClient.NewListByAutomationAccountPager -// method. -type SourceControlSyncJobClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // SourceControlSyncJobCreateParameters - The parameters supplied to the create source control sync job operation. type SourceControlSyncJobCreateParameters struct { // REQUIRED; The properties of the source control sync job. @@ -3698,19 +2966,6 @@ type SourceControlSyncJobStreamProperties struct { Time *time.Time } -// SourceControlSyncJobStreamsClientGetOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.Get -// method. -type SourceControlSyncJobStreamsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SourceControlSyncJobStreamsClientListBySyncJobOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.NewListBySyncJobPager -// method. -type SourceControlSyncJobStreamsClientListBySyncJobOptions struct { - // The filter to apply on the operation. - Filter *string -} - // SourceControlSyncJobStreamsListBySyncJob - The response model for the list source control sync job streams operation. type SourceControlSyncJobStreamsListBySyncJob struct { // The list of source control sync job streams. @@ -3765,13 +3020,6 @@ type Statistics struct { StartTime *time.Time } -// StatisticsClientListByAutomationAccountOptions contains the optional parameters for the StatisticsClient.NewListByAutomationAccountPager -// method. -type StatisticsClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - // StatisticsListResult - The response model for the list statistics operation. type StatisticsListResult struct { // Gets or sets a list of statistics. @@ -3862,31 +3110,6 @@ type TestJob struct { StatusDetails *string } -// TestJobClientCreateOptions contains the optional parameters for the TestJobClient.Create method. -type TestJobClientCreateOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientGetOptions contains the optional parameters for the TestJobClient.Get method. -type TestJobClientGetOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientResumeOptions contains the optional parameters for the TestJobClient.Resume method. -type TestJobClientResumeOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientStopOptions contains the optional parameters for the TestJobClient.Stop method. -type TestJobClientStopOptions struct { - // placeholder for future optional parameters -} - -// TestJobClientSuspendOptions contains the optional parameters for the TestJobClient.Suspend method. -type TestJobClientSuspendOptions struct { - // placeholder for future optional parameters -} - // TestJobCreateParameters - The parameters supplied to the create test job operation. type TestJobCreateParameters struct { // Gets or sets the parameters of the test job. @@ -3896,18 +3119,6 @@ type TestJobCreateParameters struct { RunOn *string } -// TestJobStreamsClientGetOptions contains the optional parameters for the TestJobStreamsClient.Get method. -type TestJobStreamsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TestJobStreamsClientListByTestJobOptions contains the optional parameters for the TestJobStreamsClient.NewListByTestJobPager -// method. -type TestJobStreamsClientListByTestJobOptions struct { - // The filter to apply on the operation. - Filter *string -} - // TrackedResource - The resource model definition for a ARM tracked top level resource type TrackedResource struct { // The Azure Region where the resource lives @@ -4059,10 +3270,12 @@ type UsageListResult struct { Value []*Usage } -// UsagesClientListByAutomationAccountOptions contains the optional parameters for the UsagesClient.NewListByAutomationAccountPager -// method. -type UsagesClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters +type UserAssignedIdentitiesProperties struct { + // READ-ONLY; The client id of user assigned identity. + ClientID *string + + // READ-ONLY; The principal id of user assigned identity. + PrincipalID *string } // Variable - Definition of the variable. @@ -4080,32 +3293,6 @@ type Variable struct { Type *string } -// VariableClientCreateOrUpdateOptions contains the optional parameters for the VariableClient.CreateOrUpdate method. -type VariableClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// VariableClientDeleteOptions contains the optional parameters for the VariableClient.Delete method. -type VariableClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// VariableClientGetOptions contains the optional parameters for the VariableClient.Get method. -type VariableClientGetOptions struct { - // placeholder for future optional parameters -} - -// VariableClientListByAutomationAccountOptions contains the optional parameters for the VariableClient.NewListByAutomationAccountPager -// method. -type VariableClientListByAutomationAccountOptions struct { - // placeholder for future optional parameters -} - -// VariableClientUpdateOptions contains the optional parameters for the VariableClient.Update method. -type VariableClientUpdateOptions struct { - // placeholder for future optional parameters -} - // VariableCreateOrUpdateParameters - The parameters supplied to the create or update variable operation. type VariableCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the variable. @@ -4196,43 +3383,6 @@ type Watcher struct { Type *string } -// WatcherClientCreateOrUpdateOptions contains the optional parameters for the WatcherClient.CreateOrUpdate method. -type WatcherClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientDeleteOptions contains the optional parameters for the WatcherClient.Delete method. -type WatcherClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientGetOptions contains the optional parameters for the WatcherClient.Get method. -type WatcherClientGetOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientListByAutomationAccountOptions contains the optional parameters for the WatcherClient.NewListByAutomationAccountPager -// method. -type WatcherClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// WatcherClientStartOptions contains the optional parameters for the WatcherClient.Start method. -type WatcherClientStartOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientStopOptions contains the optional parameters for the WatcherClient.Stop method. -type WatcherClientStopOptions struct { - // placeholder for future optional parameters -} - -// WatcherClientUpdateOptions contains the optional parameters for the WatcherClient.Update method. -type WatcherClientUpdateOptions struct { - // placeholder for future optional parameters -} - // WatcherListResult - The response model for the list watcher operation. type WatcherListResult struct { // Gets or sets the next link. @@ -4301,38 +3451,6 @@ type Webhook struct { Type *string } -// WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method. -type WebhookClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method. -type WebhookClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientGenerateURIOptions contains the optional parameters for the WebhookClient.GenerateURI method. -type WebhookClientGenerateURIOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method. -type WebhookClientGetOptions struct { - // placeholder for future optional parameters -} - -// WebhookClientListByAutomationAccountOptions contains the optional parameters for the WebhookClient.NewListByAutomationAccountPager -// method. -type WebhookClientListByAutomationAccountOptions struct { - // The filter to apply on the operation. - Filter *string -} - -// WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method. -type WebhookClientUpdateOptions struct { - // placeholder for future optional parameters -} - // WebhookCreateOrUpdateParameters - The parameters supplied to the create or update webhook operation. type WebhookCreateOrUpdateParameters struct { // REQUIRED; Gets or sets the name of the webhook. diff --git a/sdk/resourcemanager/automation/armautomation/models_serde.go b/sdk/resourcemanager/automation/armautomation/models_serde.go index 2e29468f7143..554ab6d1a0f7 100644 --- a/sdk/resourcemanager/automation/armautomation/models_serde.go +++ b/sdk/resourcemanager/automation/armautomation/models_serde.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -1045,37 +1044,6 @@ func (c *CertificateUpdateProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", c.ClientID) - populate(objectMap, "principalId", c.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c *ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &c.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &c.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Connection. func (c Connection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1974,6 +1942,37 @@ func (d *DeletedAutomationAccountProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Dimension. +func (d Dimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dimension. +func (d *Dimension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DscCompilationJob. func (d DscCompilationJob) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4645,6 +4644,88 @@ func (l *LinuxProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "name", m.Name) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Module. func (m Module) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5082,6 +5163,8 @@ func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "display", o.Display) populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populate(objectMap, "properties", o.Properties) return json.Marshal(objectMap) } @@ -5100,6 +5183,12 @@ func (o *Operation) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &o.Name) delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", o, err) @@ -5111,6 +5200,7 @@ func (o *Operation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDisplay. func (o OperationDisplay) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) populate(objectMap, "operation", o.Operation) populate(objectMap, "provider", o.Provider) populate(objectMap, "resource", o.Resource) @@ -5126,6 +5216,9 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) case "operation": err = unpopulate(val, "Operation", &o.Operation) delete(rawMsg, key) @@ -5170,6 +5263,64 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormat. +func (o OperationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationPropertiesFormat. +func (o *OperationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormatServiceSpecification. +func (o OperationPropertiesFormatServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", o.LogSpecifications) + populate(objectMap, "metricSpecifications", o.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationPropertiesFormatServiceSpecification. +func (o *OperationPropertiesFormatServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &o.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &o.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -8582,6 +8733,37 @@ func (u *UsageListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesProperties. +func (u UserAssignedIdentitiesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesProperties. +func (u *UserAssignedIdentitiesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Variable. func (v Variable) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/automation/armautomation/module_client.go b/sdk/resourcemanager/automation/armautomation/module_client.go index a086774f16eb..5e8b8c10153e 100644 --- a/sdk/resourcemanager/automation/armautomation/module_client.go +++ b/sdk/resourcemanager/automation/armautomation/module_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewModuleClient(subscriptionID string, credential azcore.TokenCredential, o // CreateOrUpdate - Create or Update the module identified by module name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The name of module. // - parameters - The create or update parameters for module. // - options - ModuleClientCreateOrUpdateOptions contains the optional parameters for the ModuleClient.CreateOrUpdate method. func (client *ModuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters, options *ModuleClientCreateOrUpdateOptions) (ModuleClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, parameters, options) if err != nil { return ModuleClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ModuleClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ModuleClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *ModuleClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,22 +116,24 @@ func (client *ModuleClient) createOrUpdateHandleResponse(resp *http.Response) (M // Delete - Delete the module by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The module name. // - options - ModuleClientDeleteOptions contains the optional parameters for the ModuleClient.Delete method. func (client *ModuleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *ModuleClientDeleteOptions) (ModuleClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, options) if err != nil { return ModuleClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ModuleClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ModuleClientDeleteResponse{}, err } return ModuleClientDeleteResponse{}, nil } @@ -155,7 +162,7 @@ func (client *ModuleClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -164,24 +171,27 @@ func (client *ModuleClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Retrieve the module identified by module name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The module name. // - options - ModuleClientGetOptions contains the optional parameters for the ModuleClient.Get method. func (client *ModuleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *ModuleClientGetOptions) (ModuleClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, options) if err != nil { return ModuleClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ModuleClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ModuleClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -208,7 +218,7 @@ func (client *ModuleClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +235,7 @@ func (client *ModuleClient) getHandleResponse(resp *http.Response) (ModuleClient // NewListByAutomationAccountPager - Retrieve a list of modules. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - ModuleClientListByAutomationAccountOptions contains the optional parameters for the ModuleClient.NewListByAutomationAccountPager @@ -278,7 +288,7 @@ func (client *ModuleClient) listByAutomationAccountCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,25 +306,28 @@ func (client *ModuleClient) listByAutomationAccountHandleResponse(resp *http.Res // Update - Update the module identified by module name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The name of module. // - parameters - The update parameters for module. // - options - ModuleClientUpdateOptions contains the optional parameters for the ModuleClient.Update method. func (client *ModuleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters, options *ModuleClientUpdateOptions) (ModuleClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, parameters, options) if err != nil { return ModuleClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ModuleClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ModuleClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ModuleClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -341,10 +354,13 @@ func (client *ModuleClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/module_client_example_test.go b/sdk/resourcemanager/automation/armautomation/module_client_example_test.go deleted file mode 100644 index a7d4d5837c99..000000000000 --- a/sdk/resourcemanager/automation/armautomation/module_client_example_test.go +++ /dev/null @@ -1,396 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteModule.json -func ExampleModuleClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewModuleClient().Delete(ctx, "rg", "myAutomationAccount33", "OmsCompositeResources", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getModule.json -func ExampleModuleClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewModuleClient().Get(ctx, "rg", "myAutomationAccount33", "OmsCompositeResources", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Module = armautomation.Module{ - // Name: to.Ptr("OmsCompositeResources"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Modules"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/OmsCompositeResources"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:41:47.003+00:00"); return t}()), - // Error: &armautomation.ModuleErrorInfo{ - // Message: to.Ptr(""), - // }, - // IsComposite: to.Ptr(true), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:42:10.567+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateModule.json -func ExampleModuleClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewModuleClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount33", "OmsCompositeResources", armautomation.ModuleCreateOrUpdateParameters{ - Properties: &armautomation.ModuleCreateOrUpdateProperties{ - ContentLink: &armautomation.ContentLink{ - ContentHash: &armautomation.ContentHash{ - Algorithm: to.Ptr("sha265"), - Value: to.Ptr("07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"), - }, - URI: to.Ptr("https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip"), - Version: to.Ptr("1.0.0.0"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Module = armautomation.Module{ - // Name: to.Ptr("OmsCompositeResources"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Modules"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/OmsCompositeResources"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:41:47.003+00:00"); return t}()), - // Error: &armautomation.ModuleErrorInfo{ - // }, - // IsComposite: to.Ptr(false), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:42:10.567+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateModule.json -func ExampleModuleClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewModuleClient().Update(ctx, "rg", "MyAutomationAccount", "MyModule", armautomation.ModuleUpdateParameters{ - Properties: &armautomation.ModuleUpdateProperties{ - ContentLink: &armautomation.ContentLink{ - ContentHash: &armautomation.ContentHash{ - Algorithm: to.Ptr("sha265"), - Value: to.Ptr("07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"), - }, - URI: to.Ptr("https://teststorage.blob.core.windows.net/mycontainer/MyModule.zip"), - Version: to.Ptr("1.0.0.0"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Module = armautomation.Module{ - // Name: to.Ptr("MyModule"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Modules"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyAutomationAccount/modules/MyModule"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:41:47.003+00:00"); return t}()), - // Error: &armautomation.ModuleErrorInfo{ - // }, - // IsComposite: to.Ptr(false), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:42:10.567+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listModulesByAutomationAccount.json -func ExampleModuleClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewModuleClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ModuleListResult = armautomation.ModuleListResult{ - // Value: []*armautomation.Module{ - // { - // Name: to.Ptr("Azure"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Azure"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-03-18T23:02:40.323+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T16:57:48.343+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Azure.Storage"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Azure.Storage"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-01-30T01:21:44.68+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:04:27.833+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("AzureRM.Automation"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Automation"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-01-30T01:19:39.427+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:02:24.42+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("AzureRM.Compute"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Compute"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-11-24T20:24:06.1+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:01:53.81+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("AzureRM.Profile"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Profile"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-11-24T20:23:34.723+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:01:22.993+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("AzureRM.Resources"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Resources"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-01-30T01:20:10.367+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:02:55.25+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("AzureRM.Sql"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Sql"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-01-30T01:20:42.177+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:03:26.08+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("AzureRM.Storage"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/AzureRM.Storage"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-01-30T01:21:13.237+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:03:56.99+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.PowerShell.Core"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Microsoft.PowerShell.Core"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-03-17T00:12:20.897+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T16:58:19.017+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.PowerShell.Diagnostics"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Microsoft.PowerShell.Diagnostics"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-03-17T00:12:22.817+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T16:58:49.737+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.PowerShell.Management"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Microsoft.PowerShell.Management"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-03-17T00:12:24.967+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T16:59:20.38+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.PowerShell.Security"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Microsoft.PowerShell.Security"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-03-17T00:12:26.753+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T16:59:51.007+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.PowerShell.Utility"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Microsoft.PowerShell.Utility"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-03-17T00:12:28.643+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:00:21.647+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Microsoft.WSMan.Management"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Microsoft.WSMan.Management"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-03-17T00:17:15.003+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:00:52.197+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("OmsCompositeResources"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/OmsCompositeResources"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:41:47.003+00:00"); return t}()), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:42:10.567+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }, - // { - // Name: to.Ptr("Orchestrator.AssetManagement.Cmdlets"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/Orchestrator.AssetManagement.Cmdlets"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-12T00:45:12.897+00:00"); return t}()), - // IsGlobal: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-17T17:05:01.57+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go b/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go index 2327173297ef..4be102c2c49a 100644 --- a/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go +++ b/sdk/resourcemanager/automation/armautomation/nodecountinformation_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -55,18 +54,21 @@ func NewNodeCountInformationClient(subscriptionID string, credential azcore.Toke // - options - NodeCountInformationClientGetOptions contains the optional parameters for the NodeCountInformationClient.Get // method. func (client *NodeCountInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, countType CountType, options *NodeCountInformationClientGetOptions) (NodeCountInformationClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, countType, options) if err != nil { return NodeCountInformationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NodeCountInformationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NodeCountInformationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NodeCountInformationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/sdk/resourcemanager/automation/armautomation/nodecountinformation_client_example_test.go b/sdk/resourcemanager/automation/armautomation/nodecountinformation_client_example_test.go deleted file mode 100644 index 3643b7b4602a..000000000000 --- a/sdk/resourcemanager/automation/armautomation/nodecountinformation_client_example_test.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeConfigurationCounts.json -func ExampleNodeCountInformationClient_Get_getNodesNodeConfigurationCounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNodeCountInformationClient().Get(ctx, "rg", "myAutomationAccount33", armautomation.CountTypeNodeconfiguration, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NodeCounts = armautomation.NodeCounts{ - // TotalCount: to.Ptr[int32](16), - // Value: []*armautomation.NodeCount{ - // { - // Name: to.Ptr("client.localhost"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](24), - // }, - // }, - // { - // Name: to.Ptr("server.localhost"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](3), - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeStatusCounts.json -func ExampleNodeCountInformationClient_Get_getNodesStatusCounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNodeCountInformationClient().Get(ctx, "rg", "myAutomationAccount33", armautomation.CountTypeStatus, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NodeCounts = armautomation.NodeCounts{ - // TotalCount: to.Ptr[int32](6), - // Value: []*armautomation.NodeCount{ - // { - // Name: to.Ptr("Compliant"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](10), - // }, - // }, - // { - // Name: to.Ptr("Failed"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](1), - // }, - // }, - // { - // Name: to.Ptr("InProgress"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](1), - // }, - // }, - // { - // Name: to.Ptr("NotCompliant"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](3), - // }, - // }, - // { - // Name: to.Ptr("Pending"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](0), - // }, - // }, - // { - // Name: to.Ptr("Unresponsive"), - // Properties: &armautomation.NodeCountProperties{ - // Count: to.Ptr[int32](4), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/nodereports_client.go b/sdk/resourcemanager/automation/armautomation/nodereports_client.go index 2f898b0df544..a8fd37504c53 100644 --- a/sdk/resourcemanager/automation/armautomation/nodereports_client.go +++ b/sdk/resourcemanager/automation/armautomation/nodereports_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -55,18 +54,21 @@ func NewNodeReportsClient(subscriptionID string, credential azcore.TokenCredenti // - reportID - The report id. // - options - NodeReportsClientGetOptions contains the optional parameters for the NodeReportsClient.Get method. func (client *NodeReportsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string, options *NodeReportsClientGetOptions) (NodeReportsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, reportID, options) if err != nil { return NodeReportsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NodeReportsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NodeReportsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NodeReportsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -122,18 +124,21 @@ func (client *NodeReportsClient) getHandleResponse(resp *http.Response) (NodeRep // - reportID - The report id. // - options - NodeReportsClientGetContentOptions contains the optional parameters for the NodeReportsClient.GetContent method. func (client *NodeReportsClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string, options *NodeReportsClientGetContentOptions) (NodeReportsClientGetContentResponse, error) { + var err error req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, nodeID, reportID, options) if err != nil { return NodeReportsClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NodeReportsClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NodeReportsClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NodeReportsClientGetContentResponse{}, err } - return client.getContentHandleResponse(resp) + resp, err := client.getContentHandleResponse(httpResp) + return resp, err } // getContentCreateRequest creates the GetContent request. diff --git a/sdk/resourcemanager/automation/armautomation/nodereports_client_example_test.go b/sdk/resourcemanager/automation/armautomation/nodereports_client_example_test.go deleted file mode 100644 index c5ef85637e3c..000000000000 --- a/sdk/resourcemanager/automation/armautomation/nodereports_client_example_test.go +++ /dev/null @@ -1,655 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listDscNodeReportsByNode.json -func ExampleNodeReportsClient_NewListByNodePager_listDscReportsByNodeId() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewNodeReportsClient().NewListByNodePager("rg", "myAutomationAccount33", "nodeId", &armautomation.NodeReportsClientListByNodeOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeReportListResult = armautomation.DscNodeReportListResult{ - // Value: []*armautomation.DscNodeReport{ - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.587+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/903a5ead-140c-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:29.4440401+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("903a5ead-140c-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.587+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.015+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/903a5eac-140c-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:28.3813034+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("903a5eac-140c-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:26.015+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:26.986+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/77c280c2-140a-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:28.216963+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("77c280c2-140a-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:25.986+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:28.668+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/5f4f5382-1408-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:29.0439184+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("5f4f5382-1408-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:27.668+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:26.957+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/5f4f5381-1408-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:27.9498533+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("5f4f5381-1408-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:25.957+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:31:26.941+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/46d97d6a-1406-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:31:27.6825492+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("46d97d6a-1406-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:31:25.941+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:10.163+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/48c8e301-1404-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:11.0040472+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("48c8e301-1404-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:10.163+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:09.897+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/2e63fdbc-1404-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:16:27.3128731+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("2e63fdbc-1404-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:16:25.897+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:01:27.899+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/15ee63e4-1402-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:01:26.6282252+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("15ee63e4-1402-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:01:25.899+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:39.511+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/0508f316-1400-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:40.577983+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("0508f316-1400-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:38.511+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:37.843+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/fd799a51-13ff-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:28.4660077+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("fd799a51-13ff-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:25.843+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:31:27.818+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/e504ae1b-13fd-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:31:28.1503168+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("e504ae1b-13fd-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:31:25.818+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:59.538+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/cd3ed224-13fb-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:37.1768158+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("cd3ed224-13fb-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:35.538+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:34.956+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/cd3ed223-13fb-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:29.2370664+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("cd3ed223-13fb-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:26.956+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:02:02.916+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/b6915efa-13f9-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:01:31.875597+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("b6915efa-13f9-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:01:29.916+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:44.626+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/a3560dca-13f7-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:39.749649+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("a3560dca-13f7-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:38.626+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:37.676+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/9b9bb016-13f7-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:27.2602881+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("9b9bb016-13f7-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:25.676+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:40:24.805+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/833bd89b-13f5-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:31:27.1356547+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("833bd89b-13f5-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:31:25.805+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeReportsByNode.json -func ExampleNodeReportsClient_NewListByNodePager_listPagedDscReportsByNodeId() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewNodeReportsClient().NewListByNodePager("rg", "myAutomationAccount33", "nodeId", &armautomation.NodeReportsClientListByNodeOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DscNodeReportListResult = armautomation.DscNodeReportListResult{ - // Value: []*armautomation.DscNodeReport{ - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.587+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/903a5ead-140c-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:29.4440401+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("903a5ead-140c-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.587+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.015+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/903a5eac-140c-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:28.3813034+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("903a5eac-140c-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:26.015+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:26.986+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/77c280c2-140a-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:28.216963+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("77c280c2-140a-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:25.986+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:28.668+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/5f4f5382-1408-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:29.0439184+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("5f4f5382-1408-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:27.668+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:26.957+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/5f4f5381-1408-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:27.9498533+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("5f4f5381-1408-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:46:25.957+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:31:26.941+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/46d97d6a-1406-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:31:27.6825492+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("46d97d6a-1406-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:31:25.941+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:10.163+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/48c8e301-1404-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:11.0040472+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("48c8e301-1404-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:10.163+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:17:09.897+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/2e63fdbc-1404-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:16:27.3128731+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("2e63fdbc-1404-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:16:25.897+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:01:27.899+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/15ee63e4-1402-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:01:26.6282252+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("15ee63e4-1402-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:01:25.899+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:39.511+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/0508f316-1400-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:40.577983+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("0508f316-1400-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:38.511+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:37.843+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/fd799a51-13ff-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:28.4660077+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("fd799a51-13ff-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:46:25.843+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:31:27.818+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/e504ae1b-13fd-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:31:28.1503168+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("e504ae1b-13fd-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:31:25.818+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:59.538+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/cd3ed224-13fb-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:37.1768158+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("cd3ed224-13fb-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:35.538+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:34.956+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/cd3ed223-13fb-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:29.2370664+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("cd3ed223-13fb-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:16:26.956+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:02:02.916+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/b6915efa-13f9-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:01:31.875597+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("b6915efa-13f9-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:01:29.916+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:44.626+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/a3560dca-13f7-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:39.749649+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("a3560dca-13f7-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:38.626+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:37.676+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/9b9bb016-13f7-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:27.2602881+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("9b9bb016-13f7-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:46:25.676+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }, - // { - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:40:24.805+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/833bd89b-13f5-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:31:27.1356547+00:00"); return t}()), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("833bd89b-13f5-11e7-a943-000d3a6140c9"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T20:31:25.805+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeReport.json -func ExampleNodeReportsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNodeReportsClient().Get(ctx, "rg", "myAutomationAccount33", "nodeId", "903a5ead-140c-11e7-a943-000d3a6140c9", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DscNodeReport = armautomation.DscNodeReport{ - // Type: to.Ptr("Consistency"), - // ConfigurationVersion: to.Ptr("2.0.0"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.587+00:00"); return t}()), - // Errors: []*armautomation.DscReportError{ - // }, - // HostName: to.Ptr("DSCCOMP"), - // IPV4Addresses: []*string{ - // to.Ptr("172.16.2.5"), - // to.Ptr("127.0.0.1")}, - // IPV6Addresses: []*string{ - // to.Ptr("fe80::4c51:9518:aa3c:256a%5"), - // to.Ptr("::2000:0:0:0"), - // to.Ptr("::1"), - // to.Ptr("::2000:0:0:0"), - // to.Ptr("2001:0:9d38:78cf:106b:130a:53ef:fdfa"), - // to.Ptr("fe80::106b:130a:53ef:fdfa%7")}, - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/nodes/nodeId/reports/903a5ead-140c-11e7-a943-000d3a6140c9"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:29.4440401+00:00"); return t}()), - // MetaConfiguration: &armautomation.DscMetaConfiguration{ - // ActionAfterReboot: to.Ptr("ContinueConfiguration"), - // AllowModuleOverwrite: to.Ptr(false), - // CertificateID: to.Ptr("certId"), - // ConfigurationMode: to.Ptr("ApplyAndMonitor"), - // ConfigurationModeFrequencyMins: to.Ptr[int32](15), - // RebootNodeIfNeeded: to.Ptr(false), - // RefreshFrequencyMins: to.Ptr[int32](30), - // }, - // NumberOfResources: to.Ptr[int32](1), - // RebootRequested: to.Ptr("False"), - // RefreshMode: to.Ptr("Pull"), - // ReportFormatVersion: to.Ptr("2.0"), - // ReportID: to.Ptr("903a5ead-140c-11e7-a943-000d3a6140c9"), - // Resources: []*armautomation.DscReportResource{ - // { - // DependsOn: []*armautomation.DscReportResourceNavigation{ - // }, - // DurationInSeconds: to.Ptr[float64](0.25), - // ModuleName: to.Ptr("PsDesiredStateConfiguration"), - // ModuleVersion: to.Ptr("1.1"), - // ResourceID: to.Ptr("[WindowsFeature]IIS"), - // ResourceName: to.Ptr("WindowsFeature"), - // SourceInfo: to.Ptr("::4::32::WindowsFeature"), - // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:28.181+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // }}, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:16:27.587+00:00"); return t}()), - // Status: to.Ptr("Compliant"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeReportContent.json -func ExampleNodeReportsClient_GetContent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewNodeReportsClient().GetContent(ctx, "rg", "myAutomationAccount33", "nodeId", "reportId", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Interface = map[string]any{ - // "AdditionalData":[]any{ - // map[string]any{ - // "Key": "OSVersion", - // "Value": "{\"VersionString\":\"Microsoft Windows NT 6.1.7601 Service Pack 1\",\"ServicePack\":\"Service Pack 1\",\"Platform\":\"Win32NT\"}", - // }, - // map[string]any{ - // "Key": "PSVersion", - // "Value": "{\"CLRVersion\":\"4.0.30319.42000\",\"PSVersion\":\"5.1.14409.1012\",\"BuildVersion\":\"10.0.14409.1012\"}", - // }, - // }, - // "Errors":[]any{ - // }, - // "IpAddress": "10.13.49.8;127.0.0.1;fe80::2cc0:8062:a210:e1c6%11;::2000:0:0:0;::1;::2000:0:0:0", - // "JobId": "eabe061f-2e1f-11e8-8d01-000d3a18dec4", - // "LCMVersion": "2.0", - // "NodeName": "ANAGG-2008R2", - // "OperationType": "Consistency", - // "ReportFormatVersion": "2.0", - // "StartTime": "2018-03-22T22:25:26.2140000+00:00", - // "StatusData":[]any{ - // "{\"IPV4Addresses\":[\"10.13.49.8\",\"127.0.0.1\"],\"MACAddresses\":[\"00-0D-3A-18-DE-C4\",\"00-00-00-00-00-00-00-E0\"],\"Type\":\"Consistency\",\"HostName\":\"ANAGG-2008R2\",\"Locale\":\"en-US\",\"StartDate\":\"2018-03-22T22:25:26.2140000+00:00\",\"JobID\":\"{EABE061F-2E1F-11E8-8D01-000D3A18DEC4}\",\"LCMVersion\":\"2.0\",\"IPV6Addresses\":[\"fe80::2cc0:8062:a210:e1c6%11\",\"::2000:0:0:0\",\"::1\",\"::2000:0:0:0\"]}", - // }, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go b/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go index bae877fdcd29..a2fec3aedf58 100644 --- a/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go +++ b/sdk/resourcemanager/automation/armautomation/objectdatatypes_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -47,7 +46,7 @@ func NewObjectDataTypesClient(subscriptionID string, credential azcore.TokenCred // NewListFieldsByModuleAndTypePager - Retrieve a list of fields of a given type identified by module name. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - moduleName - The name of module. @@ -104,7 +103,7 @@ func (client *ObjectDataTypesClient) listFieldsByModuleAndTypeCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -121,7 +120,7 @@ func (client *ObjectDataTypesClient) listFieldsByModuleAndTypeHandleResponse(res // NewListFieldsByTypePager - Retrieve a list of fields of a given type across all accessible modules. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - typeName - The name of type. @@ -173,7 +172,7 @@ func (client *ObjectDataTypesClient) listFieldsByTypeCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/objectdatatypes_client_example_test.go b/sdk/resourcemanager/automation/armautomation/objectdatatypes_client_example_test.go deleted file mode 100644 index e10d6f9eb16c..000000000000 --- a/sdk/resourcemanager/automation/armautomation/objectdatatypes_client_example_test.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listFieldsByModuleAndType.json -func ExampleObjectDataTypesClient_NewListFieldsByModuleAndTypePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewObjectDataTypesClient().NewListFieldsByModuleAndTypePager("rg", "MyAutomationAccount", "MyModule", "MyCustomType", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TypeFieldListResult = armautomation.TypeFieldListResult{ - // Value: []*armautomation.TypeField{ - // { - // Name: to.Ptr("Name"), - // Type: to.Ptr("System.String"), - // }, - // { - // Name: to.Ptr("Id"), - // Type: to.Ptr("System.Integer"), - // }, - // { - // Name: to.Ptr("Details"), - // Type: to.Ptr("MyModule.AnotherCustomType"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listFieldsByType.json -func ExampleObjectDataTypesClient_NewListFieldsByTypePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewObjectDataTypesClient().NewListFieldsByTypePager("rg", "MyAutomationAccount", "MyCustomType", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TypeFieldListResult = armautomation.TypeFieldListResult{ - // Value: []*armautomation.TypeField{ - // { - // Name: to.Ptr("Name"), - // Type: to.Ptr("System.String"), - // }, - // { - // Name: to.Ptr("Id"), - // Type: to.Ptr("System.Integer"), - // }, - // { - // Name: to.Ptr("Details"), - // Type: to.Ptr("MyModule.AnotherCustomType"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/operations_client.go b/sdk/resourcemanager/automation/armautomation/operations_client.go index 2d6d872f981a..4bd761eff4f4 100644 --- a/sdk/resourcemanager/automation/armautomation/operations_client.go +++ b/sdk/resourcemanager/automation/armautomation/operations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -40,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Automation REST API operations. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -72,7 +71,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/options.go b/sdk/resourcemanager/automation/armautomation/options.go new file mode 100644 index 000000000000..528171254569 --- /dev/null +++ b/sdk/resourcemanager/automation/armautomation/options.go @@ -0,0 +1,1028 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armautomation + +// AccountClientCreateOrUpdateOptions contains the optional parameters for the AccountClient.CreateOrUpdate method. +type AccountClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AccountClientDeleteOptions contains the optional parameters for the AccountClient.Delete method. +type AccountClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AccountClientGetOptions contains the optional parameters for the AccountClient.Get method. +type AccountClientGetOptions struct { + // placeholder for future optional parameters +} + +// AccountClientListByResourceGroupOptions contains the optional parameters for the AccountClient.NewListByResourceGroupPager +// method. +type AccountClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AccountClientListOptions contains the optional parameters for the AccountClient.NewListPager method. +type AccountClientListOptions struct { + // placeholder for future optional parameters +} + +// AccountClientUpdateOptions contains the optional parameters for the AccountClient.Update method. +type AccountClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ActivityClientGetOptions contains the optional parameters for the ActivityClient.Get method. +type ActivityClientGetOptions struct { + // placeholder for future optional parameters +} + +// ActivityClientListByModuleOptions contains the optional parameters for the ActivityClient.NewListByModulePager method. +type ActivityClientListByModuleOptions struct { + // placeholder for future optional parameters +} + +// AgentRegistrationInformationClientGetOptions contains the optional parameters for the AgentRegistrationInformationClient.Get +// method. +type AgentRegistrationInformationClientGetOptions struct { + // placeholder for future optional parameters +} + +// AgentRegistrationInformationClientRegenerateKeyOptions contains the optional parameters for the AgentRegistrationInformationClient.RegenerateKey +// method. +type AgentRegistrationInformationClientRegenerateKeyOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method. +type CertificateClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. +type CertificateClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. +type CertificateClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientListByAutomationAccountOptions contains the optional parameters for the CertificateClient.NewListByAutomationAccountPager +// method. +type CertificateClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientUpdateOptions contains the optional parameters for the CertificateClient.Update method. +type CertificateClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ClientConvertGraphRunbookContentOptions contains the optional parameters for the Client.ConvertGraphRunbookContent method. +type ClientConvertGraphRunbookContentOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientCreateOrUpdateOptions contains the optional parameters for the ConnectionClient.CreateOrUpdate method. +type ConnectionClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientDeleteOptions contains the optional parameters for the ConnectionClient.Delete method. +type ConnectionClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientGetOptions contains the optional parameters for the ConnectionClient.Get method. +type ConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientListByAutomationAccountOptions contains the optional parameters for the ConnectionClient.NewListByAutomationAccountPager +// method. +type ConnectionClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// ConnectionClientUpdateOptions contains the optional parameters for the ConnectionClient.Update method. +type ConnectionClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientCreateOrUpdateOptions contains the optional parameters for the ConnectionTypeClient.CreateOrUpdate +// method. +type ConnectionTypeClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientDeleteOptions contains the optional parameters for the ConnectionTypeClient.Delete method. +type ConnectionTypeClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientGetOptions contains the optional parameters for the ConnectionTypeClient.Get method. +type ConnectionTypeClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectionTypeClientListByAutomationAccountOptions contains the optional parameters for the ConnectionTypeClient.NewListByAutomationAccountPager +// method. +type ConnectionTypeClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientCreateOrUpdateOptions contains the optional parameters for the CredentialClient.CreateOrUpdate method. +type CredentialClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientDeleteOptions contains the optional parameters for the CredentialClient.Delete method. +type CredentialClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientGetOptions contains the optional parameters for the CredentialClient.Get method. +type CredentialClientGetOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientListByAutomationAccountOptions contains the optional parameters for the CredentialClient.NewListByAutomationAccountPager +// method. +type CredentialClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// CredentialClientUpdateOptions contains the optional parameters for the CredentialClient.Update method. +type CredentialClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DeletedAutomationAccountsClientListBySubscriptionOptions contains the optional parameters for the DeletedAutomationAccountsClient.ListBySubscription +// method. +type DeletedAutomationAccountsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// DscCompilationJobClientBeginCreateOptions contains the optional parameters for the DscCompilationJobClient.BeginCreate +// method. +type DscCompilationJobClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscCompilationJobClientGetOptions contains the optional parameters for the DscCompilationJobClient.Get method. +type DscCompilationJobClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscCompilationJobClientGetStreamOptions contains the optional parameters for the DscCompilationJobClient.GetStream method. +type DscCompilationJobClientGetStreamOptions struct { + // placeholder for future optional parameters +} + +// DscCompilationJobClientListByAutomationAccountOptions contains the optional parameters for the DscCompilationJobClient.NewListByAutomationAccountPager +// method. +type DscCompilationJobClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// DscCompilationJobStreamClientListByJobOptions contains the optional parameters for the DscCompilationJobStreamClient.ListByJob +// method. +type DscCompilationJobStreamClientListByJobOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientCreateOrUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithJSON +// method. +type DscConfigurationClientCreateOrUpdateWithJSONOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientCreateOrUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.CreateOrUpdateWithText +// method. +type DscConfigurationClientCreateOrUpdateWithTextOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientDeleteOptions contains the optional parameters for the DscConfigurationClient.Delete method. +type DscConfigurationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientGetContentOptions contains the optional parameters for the DscConfigurationClient.GetContent method. +type DscConfigurationClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientGetOptions contains the optional parameters for the DscConfigurationClient.Get method. +type DscConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscConfigurationClient.NewListByAutomationAccountPager +// method. +type DscConfigurationClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string + + // Return total rows. + Inlinecount *string + + // The number of rows to skip. + Skip *int32 + + // The number of rows to take. + Top *int32 +} + +// DscConfigurationClientUpdateWithJSONOptions contains the optional parameters for the DscConfigurationClient.UpdateWithJSON +// method. +type DscConfigurationClientUpdateWithJSONOptions struct { + // The create or update parameters for configuration. + Parameters *DscConfigurationUpdateParameters +} + +// DscConfigurationClientUpdateWithTextOptions contains the optional parameters for the DscConfigurationClient.UpdateWithText +// method. +type DscConfigurationClientUpdateWithTextOptions struct { + // The create or update parameters for configuration. + Parameters *string +} + +// DscNodeClientDeleteOptions contains the optional parameters for the DscNodeClient.Delete method. +type DscNodeClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DscNodeClientGetOptions contains the optional parameters for the DscNodeClient.Get method. +type DscNodeClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscNodeClientListByAutomationAccountOptions contains the optional parameters for the DscNodeClient.NewListByAutomationAccountPager +// method. +type DscNodeClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string + + // Return total rows. + Inlinecount *string + + // The number of rows to skip. + Skip *int32 + + // The number of rows to take. + Top *int32 +} + +// DscNodeClientUpdateOptions contains the optional parameters for the DscNodeClient.Update method. +type DscNodeClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DscNodeConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscNodeConfigurationClient.BeginCreateOrUpdate +// method. +type DscNodeConfigurationClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscNodeConfigurationClientDeleteOptions contains the optional parameters for the DscNodeConfigurationClient.Delete method. +type DscNodeConfigurationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DscNodeConfigurationClientGetOptions contains the optional parameters for the DscNodeConfigurationClient.Get method. +type DscNodeConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscNodeConfigurationClientListByAutomationAccountOptions contains the optional parameters for the DscNodeConfigurationClient.NewListByAutomationAccountPager +// method. +type DscNodeConfigurationClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string + + // Return total rows. + Inlinecount *string + + // The number of rows to skip. + Skip *int32 + + // The number of rows to take. + Top *int32 +} + +// FieldsClientListByTypeOptions contains the optional parameters for the FieldsClient.NewListByTypePager method. +type FieldsClientListByTypeOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientCreateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Create +// method. +type HybridRunbookWorkerGroupClientCreateOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientDeleteOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Delete +// method. +type HybridRunbookWorkerGroupClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientGetOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Get method. +type HybridRunbookWorkerGroupClientGetOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkerGroupClientListByAutomationAccountOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager +// method. +type HybridRunbookWorkerGroupClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// HybridRunbookWorkerGroupClientUpdateOptions contains the optional parameters for the HybridRunbookWorkerGroupClient.Update +// method. +type HybridRunbookWorkerGroupClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientCreateOptions contains the optional parameters for the HybridRunbookWorkersClient.Create method. +type HybridRunbookWorkersClientCreateOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientDeleteOptions contains the optional parameters for the HybridRunbookWorkersClient.Delete method. +type HybridRunbookWorkersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientGetOptions contains the optional parameters for the HybridRunbookWorkersClient.Get method. +type HybridRunbookWorkersClientGetOptions struct { + // placeholder for future optional parameters +} + +// HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions contains the optional parameters for the HybridRunbookWorkersClient.NewListByHybridRunbookWorkerGroupPager +// method. +type HybridRunbookWorkersClientListByHybridRunbookWorkerGroupOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// HybridRunbookWorkersClientMoveOptions contains the optional parameters for the HybridRunbookWorkersClient.Move method. +type HybridRunbookWorkersClientMoveOptions struct { + // placeholder for future optional parameters +} + +// JobClientCreateOptions contains the optional parameters for the JobClient.Create method. +type JobClientCreateOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientGetOptions contains the optional parameters for the JobClient.Get method. +type JobClientGetOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientGetOutputOptions contains the optional parameters for the JobClient.GetOutput method. +type JobClientGetOutputOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientGetRunbookContentOptions contains the optional parameters for the JobClient.GetRunbookContent method. +type JobClientGetRunbookContentOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientListByAutomationAccountOptions contains the optional parameters for the JobClient.NewListByAutomationAccountPager +// method. +type JobClientListByAutomationAccountOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. + Filter *string +} + +// JobClientResumeOptions contains the optional parameters for the JobClient.Resume method. +type JobClientResumeOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientStopOptions contains the optional parameters for the JobClient.Stop method. +type JobClientStopOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobClientSuspendOptions contains the optional parameters for the JobClient.Suspend method. +type JobClientSuspendOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobScheduleClientCreateOptions contains the optional parameters for the JobScheduleClient.Create method. +type JobScheduleClientCreateOptions struct { + // placeholder for future optional parameters +} + +// JobScheduleClientDeleteOptions contains the optional parameters for the JobScheduleClient.Delete method. +type JobScheduleClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// JobScheduleClientGetOptions contains the optional parameters for the JobScheduleClient.Get method. +type JobScheduleClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobScheduleClientListByAutomationAccountOptions contains the optional parameters for the JobScheduleClient.NewListByAutomationAccountPager +// method. +type JobScheduleClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// JobStreamClientGetOptions contains the optional parameters for the JobStreamClient.Get method. +type JobStreamClientGetOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// JobStreamClientListByJobOptions contains the optional parameters for the JobStreamClient.NewListByJobPager method. +type JobStreamClientListByJobOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. + Filter *string +} + +// KeysClientListByAutomationAccountOptions contains the optional parameters for the KeysClient.ListByAutomationAccount method. +type KeysClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// LinkedWorkspaceClientGetOptions contains the optional parameters for the LinkedWorkspaceClient.Get method. +type LinkedWorkspaceClientGetOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientCreateOrUpdateOptions contains the optional parameters for the ModuleClient.CreateOrUpdate method. +type ModuleClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientDeleteOptions contains the optional parameters for the ModuleClient.Delete method. +type ModuleClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientGetOptions contains the optional parameters for the ModuleClient.Get method. +type ModuleClientGetOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientListByAutomationAccountOptions contains the optional parameters for the ModuleClient.NewListByAutomationAccountPager +// method. +type ModuleClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// ModuleClientUpdateOptions contains the optional parameters for the ModuleClient.Update method. +type ModuleClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// NodeCountInformationClientGetOptions contains the optional parameters for the NodeCountInformationClient.Get method. +type NodeCountInformationClientGetOptions struct { + // placeholder for future optional parameters +} + +// NodeReportsClientGetContentOptions contains the optional parameters for the NodeReportsClient.GetContent method. +type NodeReportsClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// NodeReportsClientGetOptions contains the optional parameters for the NodeReportsClient.Get method. +type NodeReportsClientGetOptions struct { + // placeholder for future optional parameters +} + +// NodeReportsClientListByNodeOptions contains the optional parameters for the NodeReportsClient.NewListByNodePager method. +type NodeReportsClientListByNodeOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// ObjectDataTypesClientListFieldsByModuleAndTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByModuleAndTypePager +// method. +type ObjectDataTypesClientListFieldsByModuleAndTypeOptions struct { + // placeholder for future optional parameters +} + +// ObjectDataTypesClientListFieldsByTypeOptions contains the optional parameters for the ObjectDataTypesClient.NewListFieldsByTypePager +// method. +type ObjectDataTypesClientListFieldsByTypeOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PowerShell72ModuleClientCreateOrUpdateOptions contains the optional parameters for the PowerShell72ModuleClient.CreateOrUpdate +// method. +type PowerShell72ModuleClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// PowerShell72ModuleClientDeleteOptions contains the optional parameters for the PowerShell72ModuleClient.Delete method. +type PowerShell72ModuleClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PowerShell72ModuleClientGetOptions contains the optional parameters for the PowerShell72ModuleClient.Get method. +type PowerShell72ModuleClientGetOptions struct { + // placeholder for future optional parameters +} + +// PowerShell72ModuleClientListByAutomationAccountOptions contains the optional parameters for the PowerShell72ModuleClient.NewListByAutomationAccountPager +// method. +type PowerShell72ModuleClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// PowerShell72ModuleClientUpdateOptions contains the optional parameters for the PowerShell72ModuleClient.Update method. +type PowerShell72ModuleClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate +// method. +type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +type PrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListByAutomationAccountOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByAutomationAccountPager +// method. +type PrivateEndpointConnectionsClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientAutomationOptions contains the optional parameters for the PrivateLinkResourcesClient.NewAutomationPager +// method. +type PrivateLinkResourcesClientAutomationOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientCreateOrUpdateOptions contains the optional parameters for the Python2PackageClient.CreateOrUpdate +// method. +type Python2PackageClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientDeleteOptions contains the optional parameters for the Python2PackageClient.Delete method. +type Python2PackageClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientGetOptions contains the optional parameters for the Python2PackageClient.Get method. +type Python2PackageClientGetOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientListByAutomationAccountOptions contains the optional parameters for the Python2PackageClient.NewListByAutomationAccountPager +// method. +type Python2PackageClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// Python2PackageClientUpdateOptions contains the optional parameters for the Python2PackageClient.Update method. +type Python2PackageClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// Python3PackageClientCreateOrUpdateOptions contains the optional parameters for the Python3PackageClient.CreateOrUpdate +// method. +type Python3PackageClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// Python3PackageClientDeleteOptions contains the optional parameters for the Python3PackageClient.Delete method. +type Python3PackageClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// Python3PackageClientGetOptions contains the optional parameters for the Python3PackageClient.Get method. +type Python3PackageClientGetOptions struct { + // placeholder for future optional parameters +} + +// Python3PackageClientListByAutomationAccountOptions contains the optional parameters for the Python3PackageClient.NewListByAutomationAccountPager +// method. +type Python3PackageClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// Python3PackageClientUpdateOptions contains the optional parameters for the Python3PackageClient.Update method. +type Python3PackageClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientBeginPublishOptions contains the optional parameters for the RunbookClient.BeginPublish method. +type RunbookClientBeginPublishOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RunbookClientCreateOrUpdateOptions contains the optional parameters for the RunbookClient.CreateOrUpdate method. +type RunbookClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientDeleteOptions contains the optional parameters for the RunbookClient.Delete method. +type RunbookClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientGetContentOptions contains the optional parameters for the RunbookClient.GetContent method. +type RunbookClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientGetOptions contains the optional parameters for the RunbookClient.Get method. +type RunbookClientGetOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientListByAutomationAccountOptions contains the optional parameters for the RunbookClient.NewListByAutomationAccountPager +// method. +type RunbookClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// RunbookClientUpdateOptions contains the optional parameters for the RunbookClient.Update method. +type RunbookClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// RunbookDraftClientBeginReplaceContentOptions contains the optional parameters for the RunbookDraftClient.BeginReplaceContent +// method. +type RunbookDraftClientBeginReplaceContentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RunbookDraftClientGetContentOptions contains the optional parameters for the RunbookDraftClient.GetContent method. +type RunbookDraftClientGetContentOptions struct { + // placeholder for future optional parameters +} + +// RunbookDraftClientGetOptions contains the optional parameters for the RunbookDraftClient.Get method. +type RunbookDraftClientGetOptions struct { + // placeholder for future optional parameters +} + +// RunbookDraftClientUndoEditOptions contains the optional parameters for the RunbookDraftClient.UndoEdit method. +type RunbookDraftClientUndoEditOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientCreateOrUpdateOptions contains the optional parameters for the ScheduleClient.CreateOrUpdate method. +type ScheduleClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientDeleteOptions contains the optional parameters for the ScheduleClient.Delete method. +type ScheduleClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientGetOptions contains the optional parameters for the ScheduleClient.Get method. +type ScheduleClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientListByAutomationAccountOptions contains the optional parameters for the ScheduleClient.NewListByAutomationAccountPager +// method. +type ScheduleClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// ScheduleClientUpdateOptions contains the optional parameters for the ScheduleClient.Update method. +type ScheduleClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.GetByID +// method. +type SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationMachineRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.List +// method. +type SoftwareUpdateConfigurationMachineRunsClientListOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', + // and 'properties/softwareUpdateConfiguration/name' + Filter *string + + // number of entries you skip before returning results + Skip *string + + // Maximum number of entries returned in the results collection + Top *string +} + +// SoftwareUpdateConfigurationRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.GetByID +// method. +type SoftwareUpdateConfigurationRunsClientGetByIDOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.List +// method. +type SoftwareUpdateConfigurationRunsClientListOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', + // and 'properties/softwareUpdateConfiguration/name' + Filter *string + + // Number of entries you skip before returning results + Skip *string + + // Maximum number of entries returned in the results collection + Top *string +} + +// SoftwareUpdateConfigurationsClientCreateOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Create +// method. +type SoftwareUpdateConfigurationsClientCreateOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationsClientDeleteOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Delete +// method. +type SoftwareUpdateConfigurationsClientDeleteOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationsClientGetByNameOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.GetByName +// method. +type SoftwareUpdateConfigurationsClientGetByNameOptions struct { + // Identifies this specific client request. + ClientRequestID *string +} + +// SoftwareUpdateConfigurationsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.List +// method. +type SoftwareUpdateConfigurationsClientListOptions struct { + // Identifies this specific client request. + ClientRequestID *string + + // The filter to apply on the operation. + Filter *string +} + +// SourceControlClientCreateOrUpdateOptions contains the optional parameters for the SourceControlClient.CreateOrUpdate method. +type SourceControlClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SourceControlClientDeleteOptions contains the optional parameters for the SourceControlClient.Delete method. +type SourceControlClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SourceControlClientGetOptions contains the optional parameters for the SourceControlClient.Get method. +type SourceControlClientGetOptions struct { + // placeholder for future optional parameters +} + +// SourceControlClientListByAutomationAccountOptions contains the optional parameters for the SourceControlClient.NewListByAutomationAccountPager +// method. +type SourceControlClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// SourceControlClientUpdateOptions contains the optional parameters for the SourceControlClient.Update method. +type SourceControlClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobClientCreateOptions contains the optional parameters for the SourceControlSyncJobClient.Create method. +type SourceControlSyncJobClientCreateOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobClientGetOptions contains the optional parameters for the SourceControlSyncJobClient.Get method. +type SourceControlSyncJobClientGetOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobClientListByAutomationAccountOptions contains the optional parameters for the SourceControlSyncJobClient.NewListByAutomationAccountPager +// method. +type SourceControlSyncJobClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// SourceControlSyncJobStreamsClientGetOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.Get +// method. +type SourceControlSyncJobStreamsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SourceControlSyncJobStreamsClientListBySyncJobOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.NewListBySyncJobPager +// method. +type SourceControlSyncJobStreamsClientListBySyncJobOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// StatisticsClientListByAutomationAccountOptions contains the optional parameters for the StatisticsClient.NewListByAutomationAccountPager +// method. +type StatisticsClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// TestJobClientCreateOptions contains the optional parameters for the TestJobClient.Create method. +type TestJobClientCreateOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientGetOptions contains the optional parameters for the TestJobClient.Get method. +type TestJobClientGetOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientResumeOptions contains the optional parameters for the TestJobClient.Resume method. +type TestJobClientResumeOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientStopOptions contains the optional parameters for the TestJobClient.Stop method. +type TestJobClientStopOptions struct { + // placeholder for future optional parameters +} + +// TestJobClientSuspendOptions contains the optional parameters for the TestJobClient.Suspend method. +type TestJobClientSuspendOptions struct { + // placeholder for future optional parameters +} + +// TestJobStreamsClientGetOptions contains the optional parameters for the TestJobStreamsClient.Get method. +type TestJobStreamsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TestJobStreamsClientListByTestJobOptions contains the optional parameters for the TestJobStreamsClient.NewListByTestJobPager +// method. +type TestJobStreamsClientListByTestJobOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// UsagesClientListByAutomationAccountOptions contains the optional parameters for the UsagesClient.NewListByAutomationAccountPager +// method. +type UsagesClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// VariableClientCreateOrUpdateOptions contains the optional parameters for the VariableClient.CreateOrUpdate method. +type VariableClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// VariableClientDeleteOptions contains the optional parameters for the VariableClient.Delete method. +type VariableClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// VariableClientGetOptions contains the optional parameters for the VariableClient.Get method. +type VariableClientGetOptions struct { + // placeholder for future optional parameters +} + +// VariableClientListByAutomationAccountOptions contains the optional parameters for the VariableClient.NewListByAutomationAccountPager +// method. +type VariableClientListByAutomationAccountOptions struct { + // placeholder for future optional parameters +} + +// VariableClientUpdateOptions contains the optional parameters for the VariableClient.Update method. +type VariableClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientCreateOrUpdateOptions contains the optional parameters for the WatcherClient.CreateOrUpdate method. +type WatcherClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientDeleteOptions contains the optional parameters for the WatcherClient.Delete method. +type WatcherClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientGetOptions contains the optional parameters for the WatcherClient.Get method. +type WatcherClientGetOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientListByAutomationAccountOptions contains the optional parameters for the WatcherClient.NewListByAutomationAccountPager +// method. +type WatcherClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// WatcherClientStartOptions contains the optional parameters for the WatcherClient.Start method. +type WatcherClientStartOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientStopOptions contains the optional parameters for the WatcherClient.Stop method. +type WatcherClientStopOptions struct { + // placeholder for future optional parameters +} + +// WatcherClientUpdateOptions contains the optional parameters for the WatcherClient.Update method. +type WatcherClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method. +type WebhookClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method. +type WebhookClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientGenerateURIOptions contains the optional parameters for the WebhookClient.GenerateURI method. +type WebhookClientGenerateURIOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method. +type WebhookClientGetOptions struct { + // placeholder for future optional parameters +} + +// WebhookClientListByAutomationAccountOptions contains the optional parameters for the WebhookClient.NewListByAutomationAccountPager +// method. +type WebhookClientListByAutomationAccountOptions struct { + // The filter to apply on the operation. + Filter *string +} + +// WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method. +type WebhookClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/automation/armautomation/powershell72module_client.go b/sdk/resourcemanager/automation/armautomation/powershell72module_client.go new file mode 100644 index 000000000000..06f95603e304 --- /dev/null +++ b/sdk/resourcemanager/automation/armautomation/powershell72module_client.go @@ -0,0 +1,376 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armautomation + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PowerShell72ModuleClient contains the methods for the PowerShell72Module group. +// Don't use this type directly, use NewPowerShell72ModuleClient() instead. +type PowerShell72ModuleClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPowerShell72ModuleClient creates a new instance of PowerShell72ModuleClient with the specified values. +// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID +// forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPowerShell72ModuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PowerShell72ModuleClient, error) { + cl, err := arm.NewClient(moduleName+".PowerShell72ModuleClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PowerShell72ModuleClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or Update the module identified by module name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - moduleName - The name of module. +// - parameters - The create or update parameters for module. +// - options - PowerShell72ModuleClientCreateOrUpdateOptions contains the optional parameters for the PowerShell72ModuleClient.CreateOrUpdate +// method. +func (client *PowerShell72ModuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters, options *PowerShell72ModuleClientCreateOrUpdateOptions) (PowerShell72ModuleClientCreateOrUpdateResponse, error) { + var err error + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, parameters, options) + if err != nil { + return PowerShell72ModuleClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PowerShell72ModuleClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PowerShell72ModuleClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PowerShell72ModuleClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters, options *PowerShell72ModuleClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/powerShell72Modules/{moduleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if moduleName == "" { + return nil, errors.New("parameter moduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{moduleName}", url.PathEscape(moduleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *PowerShell72ModuleClient) createOrUpdateHandleResponse(resp *http.Response) (PowerShell72ModuleClientCreateOrUpdateResponse, error) { + result := PowerShell72ModuleClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Module); err != nil { + return PowerShell72ModuleClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete the module by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - moduleName - The module name. +// - options - PowerShell72ModuleClientDeleteOptions contains the optional parameters for the PowerShell72ModuleClient.Delete +// method. +func (client *PowerShell72ModuleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *PowerShell72ModuleClientDeleteOptions) (PowerShell72ModuleClientDeleteResponse, error) { + var err error + req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, options) + if err != nil { + return PowerShell72ModuleClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PowerShell72ModuleClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PowerShell72ModuleClientDeleteResponse{}, err + } + return PowerShell72ModuleClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PowerShell72ModuleClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *PowerShell72ModuleClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/powerShell72Modules/{moduleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if moduleName == "" { + return nil, errors.New("parameter moduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{moduleName}", url.PathEscape(moduleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieve the module identified by module name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - moduleName - The module name. +// - options - PowerShell72ModuleClientGetOptions contains the optional parameters for the PowerShell72ModuleClient.Get method. +func (client *PowerShell72ModuleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *PowerShell72ModuleClientGetOptions) (PowerShell72ModuleClientGetResponse, error) { + var err error + req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, options) + if err != nil { + return PowerShell72ModuleClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PowerShell72ModuleClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PowerShell72ModuleClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PowerShell72ModuleClient) getCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, options *PowerShell72ModuleClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/powerShell72Modules/{moduleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if moduleName == "" { + return nil, errors.New("parameter moduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{moduleName}", url.PathEscape(moduleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PowerShell72ModuleClient) getHandleResponse(resp *http.Response) (PowerShell72ModuleClientGetResponse, error) { + result := PowerShell72ModuleClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Module); err != nil { + return PowerShell72ModuleClientGetResponse{}, err + } + return result, nil +} + +// NewListByAutomationAccountPager - Retrieve a list of PowerShell72 modules. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - options - PowerShell72ModuleClientListByAutomationAccountOptions contains the optional parameters for the PowerShell72ModuleClient.NewListByAutomationAccountPager +// method. +func (client *PowerShell72ModuleClient) NewListByAutomationAccountPager(resourceGroupName string, automationAccountName string, options *PowerShell72ModuleClientListByAutomationAccountOptions) *runtime.Pager[PowerShell72ModuleClientListByAutomationAccountResponse] { + return runtime.NewPager(runtime.PagingHandler[PowerShell72ModuleClientListByAutomationAccountResponse]{ + More: func(page PowerShell72ModuleClientListByAutomationAccountResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PowerShell72ModuleClientListByAutomationAccountResponse) (PowerShell72ModuleClientListByAutomationAccountResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PowerShell72ModuleClientListByAutomationAccountResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PowerShell72ModuleClientListByAutomationAccountResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PowerShell72ModuleClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) + } + return client.listByAutomationAccountHandleResponse(resp) + }, + }) +} + +// listByAutomationAccountCreateRequest creates the ListByAutomationAccount request. +func (client *PowerShell72ModuleClient) listByAutomationAccountCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, options *PowerShell72ModuleClientListByAutomationAccountOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/powerShell72Modules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAutomationAccountHandleResponse handles the ListByAutomationAccount response. +func (client *PowerShell72ModuleClient) listByAutomationAccountHandleResponse(resp *http.Response) (PowerShell72ModuleClientListByAutomationAccountResponse, error) { + result := PowerShell72ModuleClientListByAutomationAccountResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModuleListResult); err != nil { + return PowerShell72ModuleClientListByAutomationAccountResponse{}, err + } + return result, nil +} + +// Update - Update the module identified by module name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - moduleName - The name of module. +// - parameters - The update parameters for module. +// - options - PowerShell72ModuleClientUpdateOptions contains the optional parameters for the PowerShell72ModuleClient.Update +// method. +func (client *PowerShell72ModuleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters, options *PowerShell72ModuleClientUpdateOptions) (PowerShell72ModuleClientUpdateResponse, error) { + var err error + req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, moduleName, parameters, options) + if err != nil { + return PowerShell72ModuleClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PowerShell72ModuleClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PowerShell72ModuleClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *PowerShell72ModuleClient) updateCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters, options *PowerShell72ModuleClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/powerShell72Modules/{moduleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if moduleName == "" { + return nil, errors.New("parameter moduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{moduleName}", url.PathEscape(moduleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *PowerShell72ModuleClient) updateHandleResponse(resp *http.Response) (PowerShell72ModuleClientUpdateResponse, error) { + result := PowerShell72ModuleClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Module); err != nil { + return PowerShell72ModuleClientUpdateResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go b/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go index 6abdee0c2a52..63f90d268ae2 100644 --- a/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go +++ b/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -60,7 +59,8 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -71,18 +71,20 @@ func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context. // // Generated from API version 2020-01-13-preview func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, privateEndpointConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -112,7 +114,10 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a private endpoint connection with a given name. @@ -130,7 +135,8 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -141,18 +147,20 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // // Generated from API version 2020-01-13-preview func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, automationAccountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -195,18 +203,21 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client_example_test.go deleted file mode 100644 index 5e75aec0adf5..000000000000 --- a/sdk/resourcemanager/automation/armautomation/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,187 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionListGet.json -func ExamplePrivateEndpointConnectionsClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByAutomationAccountPager("rg1", "ddb1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateEndpointConnectionListResult = armautomation.PrivateEndpointConnectionListResult{ - // Value: []*armautomation.PrivateEndpointConnection{ - // { - // Name: to.Ptr("privateEndpointConnectionName"), - // Type: to.Ptr("Microsoft.Automation/automationAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Automation/automationAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName"), - // Properties: &armautomation.PrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("sql")}, - // PrivateEndpoint: &armautomation.PrivateEndpointProperty{ - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), - // }, - // PrivateLinkServiceConnectionState: &armautomation.PrivateLinkServiceConnectionStateProperty{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // }, - // }, - // { - // Name: to.Ptr("privateEndpointConnectionName"), - // Type: to.Ptr("Microsoft.Automation/automationAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Automation/automationAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName2"), - // Properties: &armautomation.PrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("sql")}, - // PrivateEndpoint: &armautomation.PrivateEndpointProperty{ - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName2"), - // }, - // PrivateLinkServiceConnectionState: &armautomation.PrivateLinkServiceConnectionStateProperty{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionGet.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "rg1", "ddb1", "privateEndpointConnectionName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = armautomation.PrivateEndpointConnection{ - // Name: to.Ptr("privateEndpointConnectionName"), - // Type: to.Ptr("Microsoft.Automation/automationAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Automation/automationAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName"), - // Properties: &armautomation.PrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("sql")}, - // PrivateEndpoint: &armautomation.PrivateEndpointProperty{ - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), - // }, - // PrivateLinkServiceConnectionState: &armautomation.PrivateLinkServiceConnectionStateProperty{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionUpdate.json -func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "rg1", "ddb1", "privateEndpointConnectionName", armautomation.PrivateEndpointConnection{ - Properties: &armautomation.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armautomation.PrivateLinkServiceConnectionStateProperty{ - Description: to.Ptr("Approved by johndoe@contoso.com"), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateEndpointConnection = armautomation.PrivateEndpointConnection{ - // Name: to.Ptr("privateEndpointConnectionName"), - // Type: to.Ptr("Microsoft.Automation/automationAccounts/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Automation/automationAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName"), - // Properties: &armautomation.PrivateEndpointConnectionProperties{ - // GroupIDs: []*string{ - // to.Ptr("sql")}, - // PrivateEndpoint: &armautomation.PrivateEndpointProperty{ - // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"), - // }, - // PrivateLinkServiceConnectionState: &armautomation.PrivateLinkServiceConnectionStateProperty{ - // Description: to.Ptr("Auto-approved"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionDelete.json -func ExamplePrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "rg1", "ddb1", "privateEndpointConnectionName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go b/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go index 2f03a61d0804..e0298c688381 100644 --- a/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go +++ b/sdk/resourcemanager/automation/armautomation/privatelinkresources_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation diff --git a/sdk/resourcemanager/automation/armautomation/privatelinkresources_client_example_test.go b/sdk/resourcemanager/automation/armautomation/privatelinkresources_client_example_test.go deleted file mode 100644 index ecbaa6bdd14a..000000000000 --- a/sdk/resourcemanager/automation/armautomation/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,57 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateLinkResourceListGet.json -func ExamplePrivateLinkResourcesClient_NewAutomationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrivateLinkResourcesClient().NewAutomationPager("rg1", "ddb1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateLinkResourceListResult = armautomation.PrivateLinkResourceListResult{ - // Value: []*armautomation.PrivateLinkResource{ - // { - // Name: to.Ptr("sql"), - // Type: to.Ptr("Microsoft.Automation/automationAccounts/privateLinkResources"), - // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Automation/automationAccounts/ddb1/privateLinkResources/sql"), - // Properties: &armautomation.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sql"), - // RequiredMembers: []*string{ - // to.Ptr("ddb1"), - // to.Ptr("ddb1-westus")}, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/python2package_client.go b/sdk/resourcemanager/automation/armautomation/python2package_client.go index 52d68223b59c..10c8f0606e3f 100644 --- a/sdk/resourcemanager/automation/armautomation/python2package_client.go +++ b/sdk/resourcemanager/automation/armautomation/python2package_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewPython2PackageClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or Update the python 2 package identified by package name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - packageName - The name of python package. @@ -56,18 +55,21 @@ func NewPython2PackageClient(subscriptionID string, credential azcore.TokenCrede // - options - Python2PackageClientCreateOrUpdateOptions contains the optional parameters for the Python2PackageClient.CreateOrUpdate // method. func (client *Python2PackageClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageCreateParameters, options *Python2PackageClientCreateOrUpdateOptions) (Python2PackageClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, parameters, options) if err != nil { return Python2PackageClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return Python2PackageClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *Python2PackageClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,22 +117,24 @@ func (client *Python2PackageClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete the python 2 package by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - packageName - The python package name. // - options - Python2PackageClientDeleteOptions contains the optional parameters for the Python2PackageClient.Delete method. func (client *Python2PackageClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python2PackageClientDeleteOptions) (Python2PackageClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, options) if err != nil { return Python2PackageClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return Python2PackageClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientDeleteResponse{}, err } return Python2PackageClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *Python2PackageClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,24 +172,27 @@ func (client *Python2PackageClient) deleteCreateRequest(ctx context.Context, res // Get - Retrieve the python 2 package identified by package name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - packageName - The python package name. // - options - Python2PackageClientGetOptions contains the optional parameters for the Python2PackageClient.Get method. func (client *Python2PackageClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python2PackageClientGetOptions) (Python2PackageClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, options) if err != nil { return Python2PackageClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return Python2PackageClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -209,7 +219,7 @@ func (client *Python2PackageClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,7 +236,7 @@ func (client *Python2PackageClient) getHandleResponse(resp *http.Response) (Pyth // NewListByAutomationAccountPager - Retrieve a list of python 2 packages. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - Python2PackageClientListByAutomationAccountOptions contains the optional parameters for the Python2PackageClient.NewListByAutomationAccountPager @@ -279,7 +289,7 @@ func (client *Python2PackageClient) listByAutomationAccountCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,25 +307,28 @@ func (client *Python2PackageClient) listByAutomationAccountHandleResponse(resp * // Update - Update the python 2 package identified by package name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - packageName - The name of python package. // - parameters - The update parameters for python package. // - options - Python2PackageClientUpdateOptions contains the optional parameters for the Python2PackageClient.Update method. func (client *Python2PackageClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageUpdateParameters, options *Python2PackageClientUpdateOptions) (Python2PackageClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, parameters, options) if err != nil { return Python2PackageClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return Python2PackageClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return Python2PackageClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python2PackageClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -342,10 +355,13 @@ func (client *Python2PackageClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/python2package_client_example_test.go b/sdk/resourcemanager/automation/armautomation/python2package_client_example_test.go deleted file mode 100644 index db060e94ad0b..000000000000 --- a/sdk/resourcemanager/automation/armautomation/python2package_client_example_test.go +++ /dev/null @@ -1,238 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deletePython2Package.json -func ExamplePython2PackageClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPython2PackageClient().Delete(ctx, "rg", "myAutomationAccount33", "OmsCompositeResources", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getPython2Package.json -func ExamplePython2PackageClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPython2PackageClient().Get(ctx, "rg", "myAutomationAccount33", "OmsCompositeResources", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Module = armautomation.Module{ - // Name: to.Ptr("OmsCompositeResources"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Python2Packages"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/OmsCompositeResources"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:41:47.003+00:00"); return t}()), - // Error: &armautomation.ModuleErrorInfo{ - // Message: to.Ptr(""), - // }, - // IsComposite: to.Ptr(true), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:42:10.567+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdatePython2Package.json -func ExamplePython2PackageClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPython2PackageClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount33", "OmsCompositeResources", armautomation.PythonPackageCreateParameters{ - Properties: &armautomation.PythonPackageCreateProperties{ - ContentLink: &armautomation.ContentLink{ - ContentHash: &armautomation.ContentHash{ - Algorithm: to.Ptr("sha265"), - Value: to.Ptr("07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"), - }, - URI: to.Ptr("https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip"), - Version: to.Ptr("1.0.0.0"), - }, - }, - Tags: map[string]*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Module = armautomation.Module{ - // Name: to.Ptr("OmsCompositeResources"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/python2Packages"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/OmsCompositeResources"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:41:47.003+00:00"); return t}()), - // Error: &armautomation.ModuleErrorInfo{ - // }, - // IsComposite: to.Ptr(false), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:42:10.567+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updatePython2Package.json -func ExamplePython2PackageClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPython2PackageClient().Update(ctx, "rg", "MyAutomationAccount", "MyPython2Package", armautomation.PythonPackageUpdateParameters{ - Tags: map[string]*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Module = armautomation.Module{ - // Name: to.Ptr("MyPython2Package"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/python2Packages"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyAutomationAccount/python2Packages/MyPython2Package"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // }, - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:41:47.003+00:00"); return t}()), - // Error: &armautomation.ModuleErrorInfo{ - // }, - // IsComposite: to.Ptr(false), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T15:42:10.567+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPython2PackagesByAutomationAccount.json -func ExamplePython2PackageClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPython2PackageClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ModuleListResult = armautomation.ModuleListResult{ - // Value: []*armautomation.Module{ - // { - // Name: to.Ptr("configparser"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/configparser"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-17T17:57:01.7866667+00:00"); return t}()), - // IsComposite: to.Ptr(false), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-24T20:30:16.4966667+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](39573), - // Version: to.Ptr("3.5.0"), - // }, - // }, - // { - // Name: to.Ptr("flask"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/flask"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-09T18:07:44.6133333+00:00"); return t}()), - // IsComposite: to.Ptr(false), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-09T18:09:20.7733333+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](91364), - // Version: to.Ptr("1.0.2"), - // }, - // }, - // { - // Name: to.Ptr("numpy"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/python2Packages/numpy"), - // Properties: &armautomation.ModuleProperties{ - // ActivityCount: to.Ptr[int32](0), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-14T01:05:54.67+00:00"); return t}()), - // IsComposite: to.Ptr(false), - // IsGlobal: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-07-17T17:58:09.8733333+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ModuleProvisioningStateSucceeded), - // SizeInBytes: to.Ptr[int64](13345673), - // Version: to.Ptr("1.14.5"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/python3package_client.go b/sdk/resourcemanager/automation/armautomation/python3package_client.go new file mode 100644 index 000000000000..85c82ffe3ecc --- /dev/null +++ b/sdk/resourcemanager/automation/armautomation/python3package_client.go @@ -0,0 +1,374 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armautomation + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// Python3PackageClient contains the methods for the Python3Package group. +// Don't use this type directly, use NewPython3PackageClient() instead. +type Python3PackageClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPython3PackageClient creates a new instance of Python3PackageClient with the specified values. +// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID +// forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPython3PackageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Python3PackageClient, error) { + cl, err := arm.NewClient(moduleName+".Python3PackageClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &Python3PackageClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or Update the python 3 package identified by package name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - packageName - The name of python package. +// - parameters - The create or update parameters for python package. +// - options - Python3PackageClientCreateOrUpdateOptions contains the optional parameters for the Python3PackageClient.CreateOrUpdate +// method. +func (client *Python3PackageClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageCreateParameters, options *Python3PackageClientCreateOrUpdateOptions) (Python3PackageClientCreateOrUpdateResponse, error) { + var err error + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, parameters, options) + if err != nil { + return Python3PackageClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return Python3PackageClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return Python3PackageClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *Python3PackageClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageCreateParameters, options *Python3PackageClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if packageName == "" { + return nil, errors.New("parameter packageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packageName}", url.PathEscape(packageName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *Python3PackageClient) createOrUpdateHandleResponse(resp *http.Response) (Python3PackageClientCreateOrUpdateResponse, error) { + result := Python3PackageClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Module); err != nil { + return Python3PackageClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete the python 3 package by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - packageName - The python package name. +// - options - Python3PackageClientDeleteOptions contains the optional parameters for the Python3PackageClient.Delete method. +func (client *Python3PackageClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python3PackageClientDeleteOptions) (Python3PackageClientDeleteResponse, error) { + var err error + req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, options) + if err != nil { + return Python3PackageClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return Python3PackageClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return Python3PackageClientDeleteResponse{}, err + } + return Python3PackageClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *Python3PackageClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python3PackageClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if packageName == "" { + return nil, errors.New("parameter packageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packageName}", url.PathEscape(packageName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieve the python 3 package identified by package name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - packageName - The python package name. +// - options - Python3PackageClientGetOptions contains the optional parameters for the Python3PackageClient.Get method. +func (client *Python3PackageClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python3PackageClientGetOptions) (Python3PackageClientGetResponse, error) { + var err error + req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, options) + if err != nil { + return Python3PackageClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return Python3PackageClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python3PackageClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *Python3PackageClient) getCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, options *Python3PackageClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if packageName == "" { + return nil, errors.New("parameter packageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packageName}", url.PathEscape(packageName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *Python3PackageClient) getHandleResponse(resp *http.Response) (Python3PackageClientGetResponse, error) { + result := Python3PackageClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Module); err != nil { + return Python3PackageClientGetResponse{}, err + } + return result, nil +} + +// NewListByAutomationAccountPager - Retrieve a list of python 3 packages. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - options - Python3PackageClientListByAutomationAccountOptions contains the optional parameters for the Python3PackageClient.NewListByAutomationAccountPager +// method. +func (client *Python3PackageClient) NewListByAutomationAccountPager(resourceGroupName string, automationAccountName string, options *Python3PackageClientListByAutomationAccountOptions) *runtime.Pager[Python3PackageClientListByAutomationAccountResponse] { + return runtime.NewPager(runtime.PagingHandler[Python3PackageClientListByAutomationAccountResponse]{ + More: func(page Python3PackageClientListByAutomationAccountResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *Python3PackageClientListByAutomationAccountResponse) (Python3PackageClientListByAutomationAccountResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByAutomationAccountCreateRequest(ctx, resourceGroupName, automationAccountName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return Python3PackageClientListByAutomationAccountResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return Python3PackageClientListByAutomationAccountResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return Python3PackageClientListByAutomationAccountResponse{}, runtime.NewResponseError(resp) + } + return client.listByAutomationAccountHandleResponse(resp) + }, + }) +} + +// listByAutomationAccountCreateRequest creates the ListByAutomationAccount request. +func (client *Python3PackageClient) listByAutomationAccountCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, options *Python3PackageClientListByAutomationAccountOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAutomationAccountHandleResponse handles the ListByAutomationAccount response. +func (client *Python3PackageClient) listByAutomationAccountHandleResponse(resp *http.Response) (Python3PackageClientListByAutomationAccountResponse, error) { + result := Python3PackageClientListByAutomationAccountResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModuleListResult); err != nil { + return Python3PackageClientListByAutomationAccountResponse{}, err + } + return result, nil +} + +// Update - Update the python 3 package identified by package name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-11-01 +// - resourceGroupName - Name of an Azure Resource group. +// - automationAccountName - The name of the automation account. +// - packageName - The name of python package. +// - parameters - The update parameters for python package. +// - options - Python3PackageClientUpdateOptions contains the optional parameters for the Python3PackageClient.Update method. +func (client *Python3PackageClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageUpdateParameters, options *Python3PackageClientUpdateOptions) (Python3PackageClientUpdateResponse, error) { + var err error + req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, packageName, parameters, options) + if err != nil { + return Python3PackageClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return Python3PackageClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return Python3PackageClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *Python3PackageClient) updateCreateRequest(ctx context.Context, resourceGroupName string, automationAccountName string, packageName string, parameters PythonPackageUpdateParameters, options *Python3PackageClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if automationAccountName == "" { + return nil, errors.New("parameter automationAccountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{automationAccountName}", url.PathEscape(automationAccountName)) + if packageName == "" { + return nil, errors.New("parameter packageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packageName}", url.PathEscape(packageName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-11-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *Python3PackageClient) updateHandleResponse(resp *http.Response) (Python3PackageClientUpdateResponse, error) { + result := Python3PackageClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Module); err != nil { + return Python3PackageClientUpdateResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/automation/armautomation/response_types.go b/sdk/resourcemanager/automation/armautomation/response_types.go index dae8d22d0fed..78785ca19a57 100644 --- a/sdk/resourcemanager/automation/armautomation/response_types.go +++ b/sdk/resourcemanager/automation/armautomation/response_types.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -16,6 +15,7 @@ import ( // AccountClientCreateOrUpdateResponse contains the response from method AccountClient.CreateOrUpdate. type AccountClientCreateOrUpdateResponse struct { + // Definition of the automation account type. Account } @@ -26,46 +26,55 @@ type AccountClientDeleteResponse struct { // AccountClientGetResponse contains the response from method AccountClient.Get. type AccountClientGetResponse struct { + // Definition of the automation account type. Account } // AccountClientListByResourceGroupResponse contains the response from method AccountClient.NewListByResourceGroupPager. type AccountClientListByResourceGroupResponse struct { + // The response model for the list account operation. AccountListResult } // AccountClientListResponse contains the response from method AccountClient.NewListPager. type AccountClientListResponse struct { + // The response model for the list account operation. AccountListResult } // AccountClientUpdateResponse contains the response from method AccountClient.Update. type AccountClientUpdateResponse struct { + // Definition of the automation account type. Account } // ActivityClientGetResponse contains the response from method ActivityClient.Get. type ActivityClientGetResponse struct { + // Definition of the activity. Activity } // ActivityClientListByModuleResponse contains the response from method ActivityClient.NewListByModulePager. type ActivityClientListByModuleResponse struct { + // The response model for the list activity operation. ActivityListResult } // AgentRegistrationInformationClientGetResponse contains the response from method AgentRegistrationInformationClient.Get. type AgentRegistrationInformationClientGetResponse struct { + // Definition of the agent registration information type. AgentRegistration } // AgentRegistrationInformationClientRegenerateKeyResponse contains the response from method AgentRegistrationInformationClient.RegenerateKey. type AgentRegistrationInformationClientRegenerateKeyResponse struct { + // Definition of the agent registration information type. AgentRegistration } // CertificateClientCreateOrUpdateResponse contains the response from method CertificateClient.CreateOrUpdate. type CertificateClientCreateOrUpdateResponse struct { + // Definition of the certificate. Certificate } @@ -76,26 +85,31 @@ type CertificateClientDeleteResponse struct { // CertificateClientGetResponse contains the response from method CertificateClient.Get. type CertificateClientGetResponse struct { + // Definition of the certificate. Certificate } // CertificateClientListByAutomationAccountResponse contains the response from method CertificateClient.NewListByAutomationAccountPager. type CertificateClientListByAutomationAccountResponse struct { + // The response model for the list certificate operation. CertificateListResult } // CertificateClientUpdateResponse contains the response from method CertificateClient.Update. type CertificateClientUpdateResponse struct { + // Definition of the certificate. Certificate } // ClientConvertGraphRunbookContentResponse contains the response from method Client.ConvertGraphRunbookContent. type ClientConvertGraphRunbookContentResponse struct { + // Graphical Runbook Content GraphicalRunbookContent } // ConnectionClientCreateOrUpdateResponse contains the response from method ConnectionClient.CreateOrUpdate. type ConnectionClientCreateOrUpdateResponse struct { + // Definition of the connection. Connection } @@ -106,21 +120,25 @@ type ConnectionClientDeleteResponse struct { // ConnectionClientGetResponse contains the response from method ConnectionClient.Get. type ConnectionClientGetResponse struct { + // Definition of the connection. Connection } // ConnectionClientListByAutomationAccountResponse contains the response from method ConnectionClient.NewListByAutomationAccountPager. type ConnectionClientListByAutomationAccountResponse struct { + // The response model for the list connection operation. ConnectionListResult } // ConnectionClientUpdateResponse contains the response from method ConnectionClient.Update. type ConnectionClientUpdateResponse struct { + // Definition of the connection. Connection } // ConnectionTypeClientCreateOrUpdateResponse contains the response from method ConnectionTypeClient.CreateOrUpdate. type ConnectionTypeClientCreateOrUpdateResponse struct { + // Definition of the connection type. ConnectionType } @@ -131,16 +149,19 @@ type ConnectionTypeClientDeleteResponse struct { // ConnectionTypeClientGetResponse contains the response from method ConnectionTypeClient.Get. type ConnectionTypeClientGetResponse struct { + // Definition of the connection type. ConnectionType } // ConnectionTypeClientListByAutomationAccountResponse contains the response from method ConnectionTypeClient.NewListByAutomationAccountPager. type ConnectionTypeClientListByAutomationAccountResponse struct { + // The response model for the list connection type operation. ConnectionTypeListResult } // CredentialClientCreateOrUpdateResponse contains the response from method CredentialClient.CreateOrUpdate. type CredentialClientCreateOrUpdateResponse struct { + // Definition of the credential. Credential } @@ -151,56 +172,67 @@ type CredentialClientDeleteResponse struct { // CredentialClientGetResponse contains the response from method CredentialClient.Get. type CredentialClientGetResponse struct { + // Definition of the credential. Credential } // CredentialClientListByAutomationAccountResponse contains the response from method CredentialClient.NewListByAutomationAccountPager. type CredentialClientListByAutomationAccountResponse struct { + // The response model for the list credential operation. CredentialListResult } // CredentialClientUpdateResponse contains the response from method CredentialClient.Update. type CredentialClientUpdateResponse struct { + // Definition of the credential. Credential } // DeletedAutomationAccountsClientListBySubscriptionResponse contains the response from method DeletedAutomationAccountsClient.ListBySubscription. type DeletedAutomationAccountsClientListBySubscriptionResponse struct { + // The response model for the list deleted automation account. DeletedAutomationAccountListResult } // DscCompilationJobClientCreateResponse contains the response from method DscCompilationJobClient.BeginCreate. type DscCompilationJobClientCreateResponse struct { + // Definition of the Dsc Compilation job. DscCompilationJob } // DscCompilationJobClientGetResponse contains the response from method DscCompilationJobClient.Get. type DscCompilationJobClientGetResponse struct { + // Definition of the Dsc Compilation job. DscCompilationJob } // DscCompilationJobClientGetStreamResponse contains the response from method DscCompilationJobClient.GetStream. type DscCompilationJobClientGetStreamResponse struct { + // Definition of the job stream. JobStream } // DscCompilationJobClientListByAutomationAccountResponse contains the response from method DscCompilationJobClient.NewListByAutomationAccountPager. type DscCompilationJobClientListByAutomationAccountResponse struct { + // The response model for the list job operation. DscCompilationJobListResult } // DscCompilationJobStreamClientListByJobResponse contains the response from method DscCompilationJobStreamClient.ListByJob. type DscCompilationJobStreamClientListByJobResponse struct { + // The response model for the list job stream operation. JobStreamListResult } // DscConfigurationClientCreateOrUpdateWithJSONResponse contains the response from method DscConfigurationClient.CreateOrUpdateWithJSON. type DscConfigurationClientCreateOrUpdateWithJSONResponse struct { + // Definition of the configuration type. DscConfiguration } // DscConfigurationClientCreateOrUpdateWithTextResponse contains the response from method DscConfigurationClient.CreateOrUpdateWithText. type DscConfigurationClientCreateOrUpdateWithTextResponse struct { + // Definition of the configuration type. DscConfiguration } @@ -211,26 +243,30 @@ type DscConfigurationClientDeleteResponse struct { // DscConfigurationClientGetContentResponse contains the response from method DscConfigurationClient.GetContent. type DscConfigurationClientGetContentResponse struct { - Value *string + // placeholder for future response values } // DscConfigurationClientGetResponse contains the response from method DscConfigurationClient.Get. type DscConfigurationClientGetResponse struct { + // Definition of the configuration type. DscConfiguration } // DscConfigurationClientListByAutomationAccountResponse contains the response from method DscConfigurationClient.NewListByAutomationAccountPager. type DscConfigurationClientListByAutomationAccountResponse struct { + // The response model for the list configuration operation. DscConfigurationListResult } // DscConfigurationClientUpdateWithJSONResponse contains the response from method DscConfigurationClient.UpdateWithJSON. type DscConfigurationClientUpdateWithJSONResponse struct { + // Definition of the configuration type. DscConfiguration } // DscConfigurationClientUpdateWithTextResponse contains the response from method DscConfigurationClient.UpdateWithText. type DscConfigurationClientUpdateWithTextResponse struct { + // Definition of the configuration type. DscConfiguration } @@ -241,21 +277,25 @@ type DscNodeClientDeleteResponse struct { // DscNodeClientGetResponse contains the response from method DscNodeClient.Get. type DscNodeClientGetResponse struct { + // Definition of a DscNode DscNode } // DscNodeClientListByAutomationAccountResponse contains the response from method DscNodeClient.NewListByAutomationAccountPager. type DscNodeClientListByAutomationAccountResponse struct { + // The response model for the list dsc nodes operation. DscNodeListResult } // DscNodeClientUpdateResponse contains the response from method DscNodeClient.Update. type DscNodeClientUpdateResponse struct { + // Definition of a DscNode DscNode } // DscNodeConfigurationClientCreateOrUpdateResponse contains the response from method DscNodeConfigurationClient.BeginCreateOrUpdate. type DscNodeConfigurationClientCreateOrUpdateResponse struct { + // Definition of the dsc node configuration. DscNodeConfiguration } @@ -266,21 +306,25 @@ type DscNodeConfigurationClientDeleteResponse struct { // DscNodeConfigurationClientGetResponse contains the response from method DscNodeConfigurationClient.Get. type DscNodeConfigurationClientGetResponse struct { + // Definition of the dsc node configuration. DscNodeConfiguration } // DscNodeConfigurationClientListByAutomationAccountResponse contains the response from method DscNodeConfigurationClient.NewListByAutomationAccountPager. type DscNodeConfigurationClientListByAutomationAccountResponse struct { + // The response model for the list job operation. DscNodeConfigurationListResult } // FieldsClientListByTypeResponse contains the response from method FieldsClient.NewListByTypePager. type FieldsClientListByTypeResponse struct { + // The response model for the list fields operation. TypeFieldListResult } // HybridRunbookWorkerGroupClientCreateResponse contains the response from method HybridRunbookWorkerGroupClient.Create. type HybridRunbookWorkerGroupClientCreateResponse struct { + // Definition of hybrid runbook worker group. HybridRunbookWorkerGroup } @@ -291,21 +335,25 @@ type HybridRunbookWorkerGroupClientDeleteResponse struct { // HybridRunbookWorkerGroupClientGetResponse contains the response from method HybridRunbookWorkerGroupClient.Get. type HybridRunbookWorkerGroupClientGetResponse struct { + // Definition of hybrid runbook worker group. HybridRunbookWorkerGroup } // HybridRunbookWorkerGroupClientListByAutomationAccountResponse contains the response from method HybridRunbookWorkerGroupClient.NewListByAutomationAccountPager. type HybridRunbookWorkerGroupClientListByAutomationAccountResponse struct { + // The response model for the list hybrid runbook worker groups. HybridRunbookWorkerGroupsListResult } // HybridRunbookWorkerGroupClientUpdateResponse contains the response from method HybridRunbookWorkerGroupClient.Update. type HybridRunbookWorkerGroupClientUpdateResponse struct { + // Definition of hybrid runbook worker group. HybridRunbookWorkerGroup } // HybridRunbookWorkersClientCreateResponse contains the response from method HybridRunbookWorkersClient.Create. type HybridRunbookWorkersClientCreateResponse struct { + // Definition of hybrid runbook worker. HybridRunbookWorker } @@ -316,11 +364,13 @@ type HybridRunbookWorkersClientDeleteResponse struct { // HybridRunbookWorkersClientGetResponse contains the response from method HybridRunbookWorkersClient.Get. type HybridRunbookWorkersClientGetResponse struct { + // Definition of hybrid runbook worker. HybridRunbookWorker } // HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse contains the response from method HybridRunbookWorkersClient.NewListByHybridRunbookWorkerGroupPager. type HybridRunbookWorkersClientListByHybridRunbookWorkerGroupResponse struct { + // The response model for the list hybrid runbook workers. HybridRunbookWorkersListResult } @@ -331,6 +381,7 @@ type HybridRunbookWorkersClientMoveResponse struct { // JobClientCreateResponse contains the response from method JobClient.Create. type JobClientCreateResponse struct { + // Definition of the job. Job } @@ -341,6 +392,7 @@ type JobClientGetOutputResponse struct { // JobClientGetResponse contains the response from method JobClient.Get. type JobClientGetResponse struct { + // Definition of the job. Job } @@ -351,6 +403,7 @@ type JobClientGetRunbookContentResponse struct { // JobClientListByAutomationAccountResponse contains the response from method JobClient.NewListByAutomationAccountPager. type JobClientListByAutomationAccountResponse struct { + // The response model for the list job operation. JobListResultV2 } @@ -371,6 +424,7 @@ type JobClientSuspendResponse struct { // JobScheduleClientCreateResponse contains the response from method JobScheduleClient.Create. type JobScheduleClientCreateResponse struct { + // Definition of the job schedule. JobSchedule } @@ -381,21 +435,25 @@ type JobScheduleClientDeleteResponse struct { // JobScheduleClientGetResponse contains the response from method JobScheduleClient.Get. type JobScheduleClientGetResponse struct { + // Definition of the job schedule. JobSchedule } // JobScheduleClientListByAutomationAccountResponse contains the response from method JobScheduleClient.NewListByAutomationAccountPager. type JobScheduleClientListByAutomationAccountResponse struct { + // The response model for the list job schedule operation. JobScheduleListResult } // JobStreamClientGetResponse contains the response from method JobStreamClient.Get. type JobStreamClientGetResponse struct { + // Definition of the job stream. JobStream } // JobStreamClientListByJobResponse contains the response from method JobStreamClient.NewListByJobPager. type JobStreamClientListByJobResponse struct { + // The response model for the list job stream operation. JobStreamListResult } @@ -406,11 +464,13 @@ type KeysClientListByAutomationAccountResponse struct { // LinkedWorkspaceClientGetResponse contains the response from method LinkedWorkspaceClient.Get. type LinkedWorkspaceClientGetResponse struct { + // Definition of the linked workspace. LinkedWorkspace } // ModuleClientCreateOrUpdateResponse contains the response from method ModuleClient.CreateOrUpdate. type ModuleClientCreateOrUpdateResponse struct { + // Definition of the module type. Module } @@ -421,21 +481,25 @@ type ModuleClientDeleteResponse struct { // ModuleClientGetResponse contains the response from method ModuleClient.Get. type ModuleClientGetResponse struct { + // Definition of the module type. Module } // ModuleClientListByAutomationAccountResponse contains the response from method ModuleClient.NewListByAutomationAccountPager. type ModuleClientListByAutomationAccountResponse struct { + // The response model for the list module operation. ModuleListResult } // ModuleClientUpdateResponse contains the response from method ModuleClient.Update. type ModuleClientUpdateResponse struct { + // Definition of the module type. Module } // NodeCountInformationClientGetResponse contains the response from method NodeCountInformationClient.Get. type NodeCountInformationClientGetResponse struct { + // Gets the count of nodes by count type NodeCounts } @@ -447,31 +511,66 @@ type NodeReportsClientGetContentResponse struct { // NodeReportsClientGetResponse contains the response from method NodeReportsClient.Get. type NodeReportsClientGetResponse struct { + // Definition of the dsc node report type. DscNodeReport } // NodeReportsClientListByNodeResponse contains the response from method NodeReportsClient.NewListByNodePager. type NodeReportsClientListByNodeResponse struct { + // The response model for the list dsc nodes operation. DscNodeReportListResult } // ObjectDataTypesClientListFieldsByModuleAndTypeResponse contains the response from method ObjectDataTypesClient.NewListFieldsByModuleAndTypePager. type ObjectDataTypesClientListFieldsByModuleAndTypeResponse struct { + // The response model for the list fields operation. TypeFieldListResult } // ObjectDataTypesClientListFieldsByTypeResponse contains the response from method ObjectDataTypesClient.NewListFieldsByTypePager. type ObjectDataTypesClientListFieldsByTypeResponse struct { + // The response model for the list fields operation. TypeFieldListResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // The response model for the list of Automation operations OperationListResult } +// PowerShell72ModuleClientCreateOrUpdateResponse contains the response from method PowerShell72ModuleClient.CreateOrUpdate. +type PowerShell72ModuleClientCreateOrUpdateResponse struct { + // Definition of the module type. + Module +} + +// PowerShell72ModuleClientDeleteResponse contains the response from method PowerShell72ModuleClient.Delete. +type PowerShell72ModuleClientDeleteResponse struct { + // placeholder for future response values +} + +// PowerShell72ModuleClientGetResponse contains the response from method PowerShell72ModuleClient.Get. +type PowerShell72ModuleClientGetResponse struct { + // Definition of the module type. + Module +} + +// PowerShell72ModuleClientListByAutomationAccountResponse contains the response from method PowerShell72ModuleClient.NewListByAutomationAccountPager. +type PowerShell72ModuleClientListByAutomationAccountResponse struct { + // The response model for the list module operation. + ModuleListResult +} + +// PowerShell72ModuleClientUpdateResponse contains the response from method PowerShell72ModuleClient.Update. +type PowerShell72ModuleClientUpdateResponse struct { + // Definition of the module type. + Module +} + // PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { + // A private endpoint connection PrivateEndpointConnection } @@ -482,21 +581,25 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // A private endpoint connection PrivateEndpointConnection } // PrivateEndpointConnectionsClientListByAutomationAccountResponse contains the response from method PrivateEndpointConnectionsClient.NewListByAutomationAccountPager. type PrivateEndpointConnectionsClientListByAutomationAccountResponse struct { + // A list of private endpoint connections PrivateEndpointConnectionListResult } // PrivateLinkResourcesClientAutomationResponse contains the response from method PrivateLinkResourcesClient.NewAutomationPager. type PrivateLinkResourcesClientAutomationResponse struct { + // A list of private link resources PrivateLinkResourceListResult } // Python2PackageClientCreateOrUpdateResponse contains the response from method Python2PackageClient.CreateOrUpdate. type Python2PackageClientCreateOrUpdateResponse struct { + // Definition of the module type. Module } @@ -507,21 +610,54 @@ type Python2PackageClientDeleteResponse struct { // Python2PackageClientGetResponse contains the response from method Python2PackageClient.Get. type Python2PackageClientGetResponse struct { + // Definition of the module type. Module } // Python2PackageClientListByAutomationAccountResponse contains the response from method Python2PackageClient.NewListByAutomationAccountPager. type Python2PackageClientListByAutomationAccountResponse struct { + // The response model for the list module operation. ModuleListResult } // Python2PackageClientUpdateResponse contains the response from method Python2PackageClient.Update. type Python2PackageClientUpdateResponse struct { + // Definition of the module type. + Module +} + +// Python3PackageClientCreateOrUpdateResponse contains the response from method Python3PackageClient.CreateOrUpdate. +type Python3PackageClientCreateOrUpdateResponse struct { + // Definition of the module type. + Module +} + +// Python3PackageClientDeleteResponse contains the response from method Python3PackageClient.Delete. +type Python3PackageClientDeleteResponse struct { + // placeholder for future response values +} + +// Python3PackageClientGetResponse contains the response from method Python3PackageClient.Get. +type Python3PackageClientGetResponse struct { + // Definition of the module type. + Module +} + +// Python3PackageClientListByAutomationAccountResponse contains the response from method Python3PackageClient.NewListByAutomationAccountPager. +type Python3PackageClientListByAutomationAccountResponse struct { + // The response model for the list module operation. + ModuleListResult +} + +// Python3PackageClientUpdateResponse contains the response from method Python3PackageClient.Update. +type Python3PackageClientUpdateResponse struct { + // Definition of the module type. Module } // RunbookClientCreateOrUpdateResponse contains the response from method RunbookClient.CreateOrUpdate. type RunbookClientCreateOrUpdateResponse struct { + // Definition of the runbook type. Runbook } @@ -537,11 +673,13 @@ type RunbookClientGetContentResponse struct { // RunbookClientGetResponse contains the response from method RunbookClient.Get. type RunbookClientGetResponse struct { + // Definition of the runbook type. Runbook } // RunbookClientListByAutomationAccountResponse contains the response from method RunbookClient.NewListByAutomationAccountPager. type RunbookClientListByAutomationAccountResponse struct { + // The response model for the list runbook operation. RunbookListResult } @@ -552,6 +690,7 @@ type RunbookClientPublishResponse struct { // RunbookClientUpdateResponse contains the response from method RunbookClient.Update. type RunbookClientUpdateResponse struct { + // Definition of the runbook type. Runbook } @@ -578,11 +717,13 @@ func (r *RunbookDraftClientReplaceContentResponse) UnmarshalJSON(data []byte) er // RunbookDraftClientUndoEditResponse contains the response from method RunbookDraftClient.UndoEdit. type RunbookDraftClientUndoEditResponse struct { + // The response model for the undo edit runbook operation. RunbookDraftUndoEditResult } // ScheduleClientCreateOrUpdateResponse contains the response from method ScheduleClient.CreateOrUpdate. type ScheduleClientCreateOrUpdateResponse struct { + // Definition of the schedule. Schedule } @@ -593,41 +734,49 @@ type ScheduleClientDeleteResponse struct { // ScheduleClientGetResponse contains the response from method ScheduleClient.Get. type ScheduleClientGetResponse struct { + // Definition of the schedule. Schedule } // ScheduleClientListByAutomationAccountResponse contains the response from method ScheduleClient.NewListByAutomationAccountPager. type ScheduleClientListByAutomationAccountResponse struct { + // The response model for the list schedule operation. ScheduleListResult } // ScheduleClientUpdateResponse contains the response from method ScheduleClient.Update. type ScheduleClientUpdateResponse struct { + // Definition of the schedule. Schedule } // SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse contains the response from method SoftwareUpdateConfigurationMachineRunsClient.GetByID. type SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse struct { + // Software update configuration machine run model. SoftwareUpdateConfigurationMachineRun } // SoftwareUpdateConfigurationMachineRunsClientListResponse contains the response from method SoftwareUpdateConfigurationMachineRunsClient.List. type SoftwareUpdateConfigurationMachineRunsClientListResponse struct { + // result of listing all software update configuration machine runs SoftwareUpdateConfigurationMachineRunListResult } // SoftwareUpdateConfigurationRunsClientGetByIDResponse contains the response from method SoftwareUpdateConfigurationRunsClient.GetByID. type SoftwareUpdateConfigurationRunsClientGetByIDResponse struct { + // Software update configuration Run properties. SoftwareUpdateConfigurationRun } // SoftwareUpdateConfigurationRunsClientListResponse contains the response from method SoftwareUpdateConfigurationRunsClient.List. type SoftwareUpdateConfigurationRunsClientListResponse struct { + // result of listing all software update configuration runs SoftwareUpdateConfigurationRunListResult } // SoftwareUpdateConfigurationsClientCreateResponse contains the response from method SoftwareUpdateConfigurationsClient.Create. type SoftwareUpdateConfigurationsClientCreateResponse struct { + // Software update configuration properties. SoftwareUpdateConfiguration } @@ -638,16 +787,19 @@ type SoftwareUpdateConfigurationsClientDeleteResponse struct { // SoftwareUpdateConfigurationsClientGetByNameResponse contains the response from method SoftwareUpdateConfigurationsClient.GetByName. type SoftwareUpdateConfigurationsClientGetByNameResponse struct { + // Software update configuration properties. SoftwareUpdateConfiguration } // SoftwareUpdateConfigurationsClientListResponse contains the response from method SoftwareUpdateConfigurationsClient.List. type SoftwareUpdateConfigurationsClientListResponse struct { + // result of listing all software update configuration SoftwareUpdateConfigurationListResult } // SourceControlClientCreateOrUpdateResponse contains the response from method SourceControlClient.CreateOrUpdate. type SourceControlClientCreateOrUpdateResponse struct { + // Definition of the source control. SourceControl } @@ -658,56 +810,67 @@ type SourceControlClientDeleteResponse struct { // SourceControlClientGetResponse contains the response from method SourceControlClient.Get. type SourceControlClientGetResponse struct { + // Definition of the source control. SourceControl } // SourceControlClientListByAutomationAccountResponse contains the response from method SourceControlClient.NewListByAutomationAccountPager. type SourceControlClientListByAutomationAccountResponse struct { + // The response model for the list source controls operation. SourceControlListResult } // SourceControlClientUpdateResponse contains the response from method SourceControlClient.Update. type SourceControlClientUpdateResponse struct { + // Definition of the source control. SourceControl } // SourceControlSyncJobClientCreateResponse contains the response from method SourceControlSyncJobClient.Create. type SourceControlSyncJobClientCreateResponse struct { + // Definition of the source control sync job. SourceControlSyncJob } // SourceControlSyncJobClientGetResponse contains the response from method SourceControlSyncJobClient.Get. type SourceControlSyncJobClientGetResponse struct { + // Definition of the source control sync job. SourceControlSyncJobByID } // SourceControlSyncJobClientListByAutomationAccountResponse contains the response from method SourceControlSyncJobClient.NewListByAutomationAccountPager. type SourceControlSyncJobClientListByAutomationAccountResponse struct { + // The response model for the list source control sync jobs operation. SourceControlSyncJobListResult } // SourceControlSyncJobStreamsClientGetResponse contains the response from method SourceControlSyncJobStreamsClient.Get. type SourceControlSyncJobStreamsClientGetResponse struct { + // Definition of the source control sync job stream by id. SourceControlSyncJobStreamByID } // SourceControlSyncJobStreamsClientListBySyncJobResponse contains the response from method SourceControlSyncJobStreamsClient.NewListBySyncJobPager. type SourceControlSyncJobStreamsClientListBySyncJobResponse struct { + // The response model for the list source control sync job streams operation. SourceControlSyncJobStreamsListBySyncJob } // StatisticsClientListByAutomationAccountResponse contains the response from method StatisticsClient.NewListByAutomationAccountPager. type StatisticsClientListByAutomationAccountResponse struct { + // The response model for the list statistics operation. StatisticsListResult } // TestJobClientCreateResponse contains the response from method TestJobClient.Create. type TestJobClientCreateResponse struct { + // Definition of the test job. TestJob } // TestJobClientGetResponse contains the response from method TestJobClient.Get. type TestJobClientGetResponse struct { + // Definition of the test job. TestJob } @@ -728,21 +891,25 @@ type TestJobClientSuspendResponse struct { // TestJobStreamsClientGetResponse contains the response from method TestJobStreamsClient.Get. type TestJobStreamsClientGetResponse struct { + // Definition of the job stream. JobStream } // TestJobStreamsClientListByTestJobResponse contains the response from method TestJobStreamsClient.NewListByTestJobPager. type TestJobStreamsClientListByTestJobResponse struct { + // The response model for the list job stream operation. JobStreamListResult } // UsagesClientListByAutomationAccountResponse contains the response from method UsagesClient.NewListByAutomationAccountPager. type UsagesClientListByAutomationAccountResponse struct { + // The response model for the get usage operation. UsageListResult } // VariableClientCreateOrUpdateResponse contains the response from method VariableClient.CreateOrUpdate. type VariableClientCreateOrUpdateResponse struct { + // Definition of the variable. Variable } @@ -753,21 +920,25 @@ type VariableClientDeleteResponse struct { // VariableClientGetResponse contains the response from method VariableClient.Get. type VariableClientGetResponse struct { + // Definition of the variable. Variable } // VariableClientListByAutomationAccountResponse contains the response from method VariableClient.NewListByAutomationAccountPager. type VariableClientListByAutomationAccountResponse struct { + // The response model for the list variables operation. VariableListResult } // VariableClientUpdateResponse contains the response from method VariableClient.Update. type VariableClientUpdateResponse struct { + // Definition of the variable. Variable } // WatcherClientCreateOrUpdateResponse contains the response from method WatcherClient.CreateOrUpdate. type WatcherClientCreateOrUpdateResponse struct { + // Definition of the watcher type. Watcher } @@ -778,11 +949,13 @@ type WatcherClientDeleteResponse struct { // WatcherClientGetResponse contains the response from method WatcherClient.Get. type WatcherClientGetResponse struct { + // Definition of the watcher type. Watcher } // WatcherClientListByAutomationAccountResponse contains the response from method WatcherClient.NewListByAutomationAccountPager. type WatcherClientListByAutomationAccountResponse struct { + // The response model for the list watcher operation. WatcherListResult } @@ -798,11 +971,13 @@ type WatcherClientStopResponse struct { // WatcherClientUpdateResponse contains the response from method WatcherClient.Update. type WatcherClientUpdateResponse struct { + // Definition of the watcher type. Watcher } // WebhookClientCreateOrUpdateResponse contains the response from method WebhookClient.CreateOrUpdate. type WebhookClientCreateOrUpdateResponse struct { + // Definition of the webhook type. Webhook } @@ -818,15 +993,18 @@ type WebhookClientGenerateURIResponse struct { // WebhookClientGetResponse contains the response from method WebhookClient.Get. type WebhookClientGetResponse struct { + // Definition of the webhook type. Webhook } // WebhookClientListByAutomationAccountResponse contains the response from method WebhookClient.NewListByAutomationAccountPager. type WebhookClientListByAutomationAccountResponse struct { + // The response model for the list webhook operation. WebhookListResult } // WebhookClientUpdateResponse contains the response from method WebhookClient.Update. type WebhookClientUpdateResponse struct { + // Definition of the webhook type. Webhook } diff --git a/sdk/resourcemanager/automation/armautomation/runbook_client.go b/sdk/resourcemanager/automation/armautomation/runbook_client.go index 7a884393cae2..be16501ee108 100644 --- a/sdk/resourcemanager/automation/armautomation/runbook_client.go +++ b/sdk/resourcemanager/automation/armautomation/runbook_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewRunbookClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Create the runbook identified by runbook name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. @@ -56,18 +55,21 @@ func NewRunbookClient(subscriptionID string, credential azcore.TokenCredential, // not both. // - options - RunbookClientCreateOrUpdateOptions contains the optional parameters for the RunbookClient.CreateOrUpdate method. func (client *RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters, options *RunbookClientCreateOrUpdateOptions) (RunbookClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, parameters, options) if err != nil { return RunbookClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return RunbookClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RunbookClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *RunbookClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,22 +117,24 @@ func (client *RunbookClient) createOrUpdateHandleResponse(resp *http.Response) ( // Delete - Delete the runbook by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - RunbookClientDeleteOptions contains the optional parameters for the RunbookClient.Delete method. func (client *RunbookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientDeleteOptions) (RunbookClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return RunbookClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RunbookClientDeleteResponse{}, err } return RunbookClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *RunbookClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,24 +172,27 @@ func (client *RunbookClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Retrieve the runbook identified by runbook name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - RunbookClientGetOptions contains the optional parameters for the RunbookClient.Get method. func (client *RunbookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientGetOptions) (RunbookClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -209,7 +219,7 @@ func (client *RunbookClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -227,22 +237,24 @@ func (client *RunbookClient) getHandleResponse(resp *http.Response) (RunbookClie // GetContent - Retrieve the content of runbook identified by runbook name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - RunbookClientGetContentOptions contains the optional parameters for the RunbookClient.GetContent method. func (client *RunbookClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientGetContentOptions) (RunbookClientGetContentResponse, error) { + var err error req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { - return RunbookClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RunbookClientGetContentResponse{}, err } return RunbookClientGetContentResponse{}, nil } @@ -271,7 +283,7 @@ func (client *RunbookClient) getContentCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"text/powershell"} return req, nil @@ -279,7 +291,7 @@ func (client *RunbookClient) getContentCreateRequest(ctx context.Context, resour // NewListByAutomationAccountPager - Retrieve a list of runbooks. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - RunbookClientListByAutomationAccountOptions contains the optional parameters for the RunbookClient.NewListByAutomationAccountPager @@ -332,7 +344,7 @@ func (client *RunbookClient) listByAutomationAccountCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -350,7 +362,7 @@ func (client *RunbookClient) listByAutomationAccountHandleResponse(resp *http.Re // BeginPublish - Publish runbook draft. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The parameters supplied to the publish runbook operation. @@ -361,7 +373,8 @@ func (client *RunbookClient) BeginPublish(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[RunbookClientPublishResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[RunbookClientPublishResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[RunbookClientPublishResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -370,20 +383,22 @@ func (client *RunbookClient) BeginPublish(ctx context.Context, resourceGroupName // Publish - Publish runbook draft. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 func (client *RunbookClient) publish(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookClientBeginPublishOptions) (*http.Response, error) { + var err error req, err := client.publishCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // publishCreateRequest creates the Publish request. @@ -410,7 +425,7 @@ func (client *RunbookClient) publishCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -419,25 +434,28 @@ func (client *RunbookClient) publishCreateRequest(ctx context.Context, resourceG // Update - Update the runbook identified by runbook name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - parameters - The update parameters for runbook. // - options - RunbookClientUpdateOptions contains the optional parameters for the RunbookClient.Update method. func (client *RunbookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters, options *RunbookClientUpdateOptions) (RunbookClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, parameters, options) if err != nil { return RunbookClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -464,10 +482,13 @@ func (client *RunbookClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/runbook_client_example_test.go b/sdk/resourcemanager/automation/armautomation/runbook_client_example_test.go deleted file mode 100644 index acf3bcdb607c..000000000000 --- a/sdk/resourcemanager/automation/armautomation/runbook_client_example_test.go +++ /dev/null @@ -1,347 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/publishRunbook.json -func ExampleRunbookClient_BeginPublish() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewRunbookClient().BeginPublish(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookContent.json -func ExampleRunbookClient_GetContent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewRunbookClient().GetContent(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbook.json -func ExampleRunbookClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRunbookClient().Get(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Runbook = armautomation.Runbook{ - // Name: to.Ptr("Get-AzureVMTutorial"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Runbooks"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // "tag01": to.Ptr("value01"), - // "tag02": to.Ptr("value02"), - // }, - // Etag: to.Ptr("\"636263335437500000\""), - // Properties: &armautomation.RunbookProperties{ - // Description: to.Ptr("Description of the Runbook"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:23.75+00:00"); return t}()), - // JobCount: to.Ptr[int32](0), - // LastModifiedBy: to.Ptr("myEmaild@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:23.75+00:00"); return t}()), - // LogActivityTrace: to.Ptr[int32](1), - // LogProgress: to.Ptr(true), - // LogVerbose: to.Ptr(false), - // OutputTypes: []*string{ - // }, - // Parameters: map[string]*armautomation.RunbookParameter{ - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RunbookType: to.Ptr(armautomation.RunbookTypeEnumPowerShellWorkflow), - // State: to.Ptr(armautomation.RunbookStatePublished), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/createOrUpdateRunbook.json -func ExampleRunbookClient_CreateOrUpdate_createOrUpdateRunbookAndPublishIt() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRunbookClient().CreateOrUpdate(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", armautomation.RunbookCreateOrUpdateParameters{ - Name: to.Ptr("Get-AzureVMTutorial"), - Location: to.Ptr("East US 2"), - Properties: &armautomation.RunbookCreateOrUpdateProperties{ - Description: to.Ptr("Description of the Runbook"), - LogActivityTrace: to.Ptr[int32](1), - LogProgress: to.Ptr(true), - LogVerbose: to.Ptr(false), - PublishContentLink: &armautomation.ContentLink{ - ContentHash: &armautomation.ContentHash{ - Algorithm: to.Ptr("SHA256"), - Value: to.Ptr("115775B8FF2BE672D8A946BD0B489918C724DDE15A440373CA54461D53010A80"), - }, - URI: to.Ptr("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"), - }, - RunbookType: to.Ptr(armautomation.RunbookTypeEnumPowerShellWorkflow), - }, - Tags: map[string]*string{ - "tag01": to.Ptr("value01"), - "tag02": to.Ptr("value02"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Runbook = armautomation.Runbook{ - // Name: to.Ptr("Get-AzureVMTutorial"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Runbooks"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // "tag01": to.Ptr("value01"), - // "tag02": to.Ptr("value02"), - // }, - // Etag: to.Ptr("\"636263318866000000\""), - // Properties: &armautomation.RunbookProperties{ - // Description: to.Ptr("Description of the Runbook"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:04:43.66+00:00"); return t}()), - // JobCount: to.Ptr[int32](0), - // LastModifiedBy: to.Ptr("myEmaild@microsoft.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:04:46.6+00:00"); return t}()), - // LogActivityTrace: to.Ptr[int32](1), - // LogProgress: to.Ptr(true), - // LogVerbose: to.Ptr(true), - // OutputTypes: []*string{ - // }, - // Parameters: map[string]*armautomation.RunbookParameter{ - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RunbookType: to.Ptr(armautomation.RunbookTypeEnumPowerShellWorkflow), - // State: to.Ptr(armautomation.RunbookStatePublished), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/createRunbookAsDraft.json -func ExampleRunbookClient_CreateOrUpdate_createRunbookAsDraft() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRunbookClient().CreateOrUpdate(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", armautomation.RunbookCreateOrUpdateParameters{ - Name: to.Ptr("Get-AzureVMTutorial"), - Location: to.Ptr("East US 2"), - Properties: &armautomation.RunbookCreateOrUpdateProperties{ - Description: to.Ptr("Description of the Runbook"), - Draft: &armautomation.RunbookDraft{}, - LogProgress: to.Ptr(false), - LogVerbose: to.Ptr(false), - RunbookType: to.Ptr(armautomation.RunbookTypeEnumPowerShellWorkflow), - }, - Tags: map[string]*string{ - "tag01": to.Ptr("value01"), - "tag02": to.Ptr("value02"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Runbook = armautomation.Runbook{ - // Name: to.Ptr("Get-AzureVMTutorial"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Runbooks"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial"), - // Location: to.Ptr("East US 2"), - // Tags: map[string]*string{ - // "tag01": to.Ptr("value01"), - // "tag02": to.Ptr("value02"), - // }, - // Etag: to.Ptr("\"636263318866000000\""), - // Properties: &armautomation.RunbookProperties{ - // Description: to.Ptr("Description of the Runbook"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T03:25:59.097+00:00"); return t}()), - // JobCount: to.Ptr[int32](0), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T03:25:59.097+00:00"); return t}()), - // LogActivityTrace: to.Ptr[int32](0), - // LogProgress: to.Ptr(false), - // LogVerbose: to.Ptr(false), - // Parameters: map[string]*armautomation.RunbookParameter{ - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // RunbookType: to.Ptr(armautomation.RunbookTypeEnumScript), - // State: to.Ptr(armautomation.RunbookStateNew), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/updateRunbook.json -func ExampleRunbookClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewRunbookClient().Update(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", armautomation.RunbookUpdateParameters{ - Properties: &armautomation.RunbookUpdateProperties{ - Description: to.Ptr("Updated Description of the Runbook"), - LogActivityTrace: to.Ptr[int32](1), - LogProgress: to.Ptr(true), - LogVerbose: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/deleteRunbook.json -func ExampleRunbookClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewRunbookClient().Delete(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/listRunbooksByAutomationAccount.json -func ExampleRunbookClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewRunbookClient().NewListByAutomationAccountPager("rg", "ContoseAutomationAccount", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RunbookListResult = armautomation.RunbookListResult{ - // Value: []*armautomation.Runbook{ - // { - // Name: to.Ptr("ASR-AddPublicIp"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Runbooks"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/ASR-AddPublicIp"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.RunbookProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:25.78+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:25.81+00:00"); return t}()), - // LogActivityTrace: to.Ptr[int32](1), - // LogProgress: to.Ptr(true), - // LogVerbose: to.Ptr(true), - // RunbookType: to.Ptr(armautomation.RunbookTypeEnumPowerShell), - // State: to.Ptr(armautomation.RunbookStatePublished), - // }, - // }, - // { - // Name: to.Ptr("AutoExport"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Runbooks"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/AutoExport"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.RunbookProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:27.327+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:27.327+00:00"); return t}()), - // LogActivityTrace: to.Ptr[int32](1), - // LogProgress: to.Ptr(true), - // LogVerbose: to.Ptr(true), - // RunbookType: to.Ptr(armautomation.RunbookTypeEnumPowerShell), - // State: to.Ptr(armautomation.RunbookStatePublished), - // }, - // }, - // { - // Name: to.Ptr("Get-AzureVMTutorial"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Runbooks"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial"), - // Location: to.Ptr("East US 2"), - // Properties: &armautomation.RunbookProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:23.75+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T21:32:23.75+00:00"); return t}()), - // LogActivityTrace: to.Ptr[int32](1), - // LogProgress: to.Ptr(true), - // LogVerbose: to.Ptr(false), - // RunbookType: to.Ptr(armautomation.RunbookTypeEnumPowerShellWorkflow), - // State: to.Ptr(armautomation.RunbookStatePublished), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go b/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go index 6c9e0e587e73..edc458376a78 100644 --- a/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go +++ b/sdk/resourcemanager/automation/armautomation/runbookdraft_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -49,24 +48,27 @@ func NewRunbookDraftClient(subscriptionID string, credential azcore.TokenCredent // Get - Retrieve the runbook draft identified by runbook name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - RunbookDraftClientGetOptions contains the optional parameters for the RunbookDraftClient.Get method. func (client *RunbookDraftClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookDraftClientGetOptions) (RunbookDraftClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookDraftClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookDraftClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookDraftClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookDraftClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -93,7 +95,7 @@ func (client *RunbookDraftClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,22 +113,24 @@ func (client *RunbookDraftClient) getHandleResponse(resp *http.Response) (Runboo // GetContent - Retrieve the content of runbook draft identified by runbook name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - RunbookDraftClientGetContentOptions contains the optional parameters for the RunbookDraftClient.GetContent method. func (client *RunbookDraftClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookDraftClientGetContentOptions) (RunbookDraftClientGetContentResponse, error) { + var err error req, err := client.getContentCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookDraftClientGetContentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookDraftClientGetContentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { - return RunbookDraftClientGetContentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RunbookDraftClientGetContentResponse{}, err } return RunbookDraftClientGetContentResponse{}, nil } @@ -155,7 +159,7 @@ func (client *RunbookDraftClient) getContentCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"text/powershell"} return req, nil @@ -164,7 +168,7 @@ func (client *RunbookDraftClient) getContentCreateRequest(ctx context.Context, r // BeginReplaceContent - Replaces the runbook draft content. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. @@ -177,7 +181,10 @@ func (client *RunbookDraftClient) BeginReplaceContent(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[RunbookDraftClientReplaceContentResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RunbookDraftClientReplaceContentResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + return poller, err } else { return runtime.NewPollerFromResumeToken[RunbookDraftClientReplaceContentResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -186,20 +193,22 @@ func (client *RunbookDraftClient) BeginReplaceContent(ctx context.Context, resou // ReplaceContent - Replaces the runbook draft content. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 func (client *RunbookDraftClient) replaceContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent io.ReadSeekCloser, options *RunbookDraftClientBeginReplaceContentOptions) (*http.Response, error) { + var err error req, err := client.replaceContentCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, runbookContent, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // replaceContentCreateRequest creates the ReplaceContent request. @@ -226,34 +235,40 @@ func (client *RunbookDraftClient) replaceContentCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} - return req, req.SetBody(runbookContent, "text/powershell") + if err := req.SetBody(runbookContent, "text/powershell"); err != nil { + return nil, err + } + return req, nil } // UndoEdit - Undo draft edit to last known published state identified by runbook name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - RunbookDraftClientUndoEditOptions contains the optional parameters for the RunbookDraftClient.UndoEdit method. func (client *RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *RunbookDraftClientUndoEditOptions) (RunbookDraftClientUndoEditResponse, error) { + var err error req, err := client.undoEditCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return RunbookDraftClientUndoEditResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RunbookDraftClientUndoEditResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RunbookDraftClientUndoEditResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RunbookDraftClientUndoEditResponse{}, err } - return client.undoEditHandleResponse(resp) + resp, err := client.undoEditHandleResponse(httpResp) + return resp, err } // undoEditCreateRequest creates the UndoEdit request. @@ -280,7 +295,7 @@ func (client *RunbookDraftClient) undoEditCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/runbookdraft_client_example_test.go b/sdk/resourcemanager/automation/armautomation/runbookdraft_client_example_test.go deleted file mode 100644 index d1d30488a1ee..000000000000 --- a/sdk/resourcemanager/automation/armautomation/runbookdraft_client_example_test.go +++ /dev/null @@ -1,81 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookDraftContent.json -func ExampleRunbookDraftClient_GetContent() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewRunbookDraftClient().GetContent(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookDraft.json -func ExampleRunbookDraftClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewRunbookDraftClient().Get(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RunbookDraft = armautomation.RunbookDraft{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T03:25:59.11+00:00"); return t}()), - // InEdit: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T04:48:56.43+00:00"); return t}()), - // OutputTypes: []*string{ - // }, - // Parameters: map[string]*armautomation.RunbookParameter{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/undoDraftEditToLastKnownPublishedState.json -func ExampleRunbookDraftClient_UndoEdit() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewRunbookDraftClient().UndoEdit(ctx, "rg", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/automation/armautomation/schedule_client.go b/sdk/resourcemanager/automation/armautomation/schedule_client.go index 645097163801..819ff4596d48 100644 --- a/sdk/resourcemanager/automation/armautomation/schedule_client.go +++ b/sdk/resourcemanager/automation/armautomation/schedule_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewScheduleClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Create a schedule. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - scheduleName - The schedule name. // - parameters - The parameters supplied to the create or update schedule operation. // - options - ScheduleClientCreateOrUpdateOptions contains the optional parameters for the ScheduleClient.CreateOrUpdate method. func (client *ScheduleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters, options *ScheduleClientCreateOrUpdateOptions) (ScheduleClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, scheduleName, parameters, options) if err != nil { return ScheduleClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusConflict) { - return ScheduleClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusConflict) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *ScheduleClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,22 +116,24 @@ func (client *ScheduleClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Delete the schedule identified by schedule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - scheduleName - The schedule name. // - options - ScheduleClientDeleteOptions contains the optional parameters for the ScheduleClient.Delete method. func (client *ScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, options *ScheduleClientDeleteOptions) (ScheduleClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, scheduleName, options) if err != nil { return ScheduleClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduleClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientDeleteResponse{}, err } return ScheduleClientDeleteResponse{}, nil } @@ -155,7 +162,7 @@ func (client *ScheduleClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -164,24 +171,27 @@ func (client *ScheduleClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Retrieve the schedule identified by schedule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - scheduleName - The schedule name. // - options - ScheduleClientGetOptions contains the optional parameters for the ScheduleClient.Get method. func (client *ScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, options *ScheduleClientGetOptions) (ScheduleClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, scheduleName, options) if err != nil { return ScheduleClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduleClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -208,7 +218,7 @@ func (client *ScheduleClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +235,7 @@ func (client *ScheduleClient) getHandleResponse(resp *http.Response) (ScheduleCl // NewListByAutomationAccountPager - Retrieve a list of schedules. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - ScheduleClientListByAutomationAccountOptions contains the optional parameters for the ScheduleClient.NewListByAutomationAccountPager @@ -278,7 +288,7 @@ func (client *ScheduleClient) listByAutomationAccountCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,25 +306,28 @@ func (client *ScheduleClient) listByAutomationAccountHandleResponse(resp *http.R // Update - Update the schedule identified by schedule name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - scheduleName - The schedule name. // - parameters - The parameters supplied to the update schedule operation. // - options - ScheduleClientUpdateOptions contains the optional parameters for the ScheduleClient.Update method. func (client *ScheduleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters, options *ScheduleClientUpdateOptions) (ScheduleClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, scheduleName, parameters, options) if err != nil { return ScheduleClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScheduleClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduleClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScheduleClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -341,10 +354,13 @@ func (client *ScheduleClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/schedule_client_example_test.go b/sdk/resourcemanager/automation/armautomation/schedule_client_example_test.go deleted file mode 100644 index be42dccce6ef..000000000000 --- a/sdk/resourcemanager/automation/armautomation/schedule_client_example_test.go +++ /dev/null @@ -1,3590 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateSchedule.json -func ExampleScheduleClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewScheduleClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount33", "mySchedule", armautomation.ScheduleCreateOrUpdateParameters{ - Name: to.Ptr("mySchedule"), - Properties: &armautomation.ScheduleCreateOrUpdateProperties{ - Description: to.Ptr("my description of schedule goes here"), - AdvancedSchedule: &armautomation.AdvancedSchedule{}, - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:57.2494819Z"); return t }()), - Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - Interval: float64(1), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:57.2494819Z"); return t }()), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Schedule = armautomation.Schedule{ - // Name: to.Ptr("mySchedule"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T16:59:22.697+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T16:59:22.697+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateSchedule.json -func ExampleScheduleClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewScheduleClient().Update(ctx, "rg", "myAutomationAccount33", "mySchedule", armautomation.ScheduleUpdateParameters{ - Name: to.Ptr("mySchedule"), - Properties: &armautomation.ScheduleUpdateProperties{ - Description: to.Ptr("my updated description of schedule goes here"), - IsEnabled: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Schedule = armautomation.Schedule{ - // Name: to.Ptr("mySchedule"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my updated description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T16:59:22.697+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T16:59:22.697+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getSchedule.json -func ExampleScheduleClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewScheduleClient().Get(ctx, "rg", "myAutomationAccount33", "mySchedule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Schedule = armautomation.Schedule{ - // Name: to.Ptr("mySchedule"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T16:59:22.697+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T16:59:22.697+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteSchedule.json -func ExampleScheduleClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewScheduleClient().Delete(ctx, "rg", "myAutomationAccount33", "mySchedule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listSchedulesByAutomationAccount_First100.json -func ExampleScheduleClient_NewListByAutomationAccountPager_listSchedulesByAutomationAccountFirst100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewScheduleClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ScheduleListResult = armautomation.ScheduleListResult{ - // Value: []*armautomation.Schedule{ - // { - // Name: to.Ptr("mySchedule"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my updated description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T16:59:22.697+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:14.027+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:28:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule0"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule0"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:17.18+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:17.18+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule1"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule1"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:17.493+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:17.493+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule10"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule10"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:20.54+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:20.54+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule100"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule100"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:50.103+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:50.103+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule101"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule101"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:50.433+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:50.433+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule102"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule102"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:50.713+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:50.713+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule103"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule103"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.04+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.04+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule104"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule104"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.323+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.323+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule105"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule105"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.62+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.62+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule106"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule106"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.9+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:51.9+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule107"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule107"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:52.183+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:52.183+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule108"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule108"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:52.48+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:52.48+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule109"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule109"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:52.76+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:52.76+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule11"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule11"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:20.883+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:20.883+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule110"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule110"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:53.073+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:53.073+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule111"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule111"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:53.48+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:53.48+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule112"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule112"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:53.807+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:53.807+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule113"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule113"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.073+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.073+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule114"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule114"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule115"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule115"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.65+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.65+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule116"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule116"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.933+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:54.933+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule117"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule117"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:55.277+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:55.277+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule118"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule118"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:55.65+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:55.65+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule119"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule119"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:55.95+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:55.95+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule12"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule12"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:21.213+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:21.213+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule120"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule120"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:56.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:56.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule121"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule121"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:56.65+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:56.65+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule122"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule122"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:56.95+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:56.95+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule123"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule123"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:57.247+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:57.247+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule124"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule124"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:57.573+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:57.573+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule125"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule125"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:57.9+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:57.9+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule126"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule126"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:58.387+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:58.387+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule127"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule127"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:58.7+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:58.7+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule128"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule128"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:59.4+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:59.4+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule129"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule129"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:59.73+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:59.73+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule13"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule13"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:21.603+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:21.603+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule130"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule130"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:00.09+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:00.09+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule131"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule131"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:00.4+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:00.4+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule132"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule132"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:00.683+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:00.683+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule133"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule133"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.073+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.073+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule134"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule134"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.387+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.387+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule135"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule135"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.667+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.667+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule136"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule136"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.95+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:01.95+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule137"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule137"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:02.247+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:02.247+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule138"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule138"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:02.557+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:02.557+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule139"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule139"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:02.853+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:02.853+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule14"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule14"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:21.98+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:21.98+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule140"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule140"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:03.247+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:03.247+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule141"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule141"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:03.573+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:03.573+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule142"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule142"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:03.87+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:03.87+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule143"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule143"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:04.2+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:04.2+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule144"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule144"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:04.48+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:04.48+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule145"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule145"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:04.76+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:04.76+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule146"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule146"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.027+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.027+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule147"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule147"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule148"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule148"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.65+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.65+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule149"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule149"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.95+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:05.95+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule15"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule15"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:22.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:22.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule150"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule150"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:06.247+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:06.247+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule151"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule151"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:06.527+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:06.527+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule152"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule152"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:06.81+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:06.81+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule153"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule153"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:07.157+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:07.157+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule154"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule154"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:07.453+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:07.453+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule155"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule155"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:07.75+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:07.75+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule156"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule156"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:08.093+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:08.093+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule157"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule157"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:08.513+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:08.513+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule158"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule158"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:08.873+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:08.873+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule159"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule159"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:09.203+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:09.203+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule16"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule16"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:22.697+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:22.697+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule160"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule160"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:09.547+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:09.547+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule161"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule161"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:09.843+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:09.843+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule162"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule162"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:10.14+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:10.14+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule163"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule163"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:10.437+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:10.437+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule164"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule164"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:10.72+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:10.72+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule165"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule165"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.013+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.013+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule166"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule166"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.297+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.297+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule167"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule167"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.61+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.61+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule168"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule168"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.89+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:11.89+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule169"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule169"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:12.203+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:12.203+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule17"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule17"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:23.027+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:23.027+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule170"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule170"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:12.453+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:12.453+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule171"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule171"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:12.733+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:12.733+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule172"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule172"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.03+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.03+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule173"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule173"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.31+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.31+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule174"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule174"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.623+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.623+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule175"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule175"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.937+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:01:13.937+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule18"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule18"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:23.337+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:23.337+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule19"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule19"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:23.667+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:23.667+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule2"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule2"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:17.823+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:17.823+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule20"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule20"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.01+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.01+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule21"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule21"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.337+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.337+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule22"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule22"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.667+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.667+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule23"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule23"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.98+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:24.98+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule24"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule24"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:25.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:25.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule25"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule25"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:25.68+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:25.68+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule26"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule26"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.01+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.01+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule27"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule27"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.323+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.323+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule28"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule28"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.65+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.65+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule29"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule29"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.947+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:26.947+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listSchedulesByAutomationAccount_Next100.json -func ExampleScheduleClient_NewListByAutomationAccountPager_listSchedulesByAutomationAccountNext100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewScheduleClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ScheduleListResult = armautomation.ScheduleListResult{ - // Value: []*armautomation.Schedule{ - // { - // Name: to.Ptr("mySchedule3"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule3"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:18.12+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:18.12+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule30"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule30"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:27.277+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:27.277+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule31"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule31"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:27.603+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:27.603+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule32"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule32"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:28.04+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:28.04+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule33"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule33"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:28.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:28.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule34"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule34"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:28.667+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:28.667+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule35"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule35"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.01+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.01+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule36"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule36"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule37"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule37"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.68+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.68+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule38"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule38"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.993+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:29.993+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule39"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule39"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:30.307+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:30.307+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule4"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule4"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:18.417+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:18.417+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule40"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule40"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:30.62+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:30.62+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule41"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule41"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:30.93+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:30.93+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule42"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule42"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:31.26+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:31.26+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule43"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule43"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:31.573+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:31.573+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule44"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule44"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:31.947+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:31.947+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule45"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule45"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:32.29+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:32.29+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule46"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule46"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:32.603+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:32.603+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule47"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule47"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:32.93+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:32.93+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule48"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule48"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:33.51+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:33.51+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule49"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule49"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:33.823+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:33.823+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule5"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule5"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:18.743+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:18.743+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule50"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule50"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:34.15+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:34.15+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule51"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule51"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:34.447+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:34.447+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule52"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule52"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:34.743+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:34.743+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule53"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule53"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.057+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.057+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule54"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule54"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.37+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.37+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule55"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule55"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.683+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.683+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule56"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule56"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.98+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:35.98+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule57"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule57"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:36.277+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:36.277+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule58"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule58"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:36.603+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:36.603+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule59"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule59"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:36.947+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:36.947+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule6"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule6"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:19.103+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:19.103+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule60"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule60"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:37.26+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:37.26+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule61"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule61"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:37.557+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:37.557+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule62"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule62"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:37.963+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:37.963+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule63"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule63"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:38.29+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:38.29+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule64"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule64"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:38.603+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:38.603+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule65"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule65"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:38.917+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:38.917+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule66"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule66"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:39.307+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:39.307+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule67"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule67"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:39.59+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:39.59+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule68"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule68"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:39.947+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:39.947+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule69"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule69"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:40.307+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:40.307+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule7"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule7"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:19.51+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:19.51+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule70"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule70"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:40.667+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:40.667+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule71"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule71"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.01+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.01+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule72"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule72"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.323+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.323+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule73"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule73"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.637+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.637+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule74"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule74"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.933+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:41.933+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule75"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule75"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:42.26+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:42.26+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule76"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule76"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:42.573+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:42.573+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule77"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule77"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:42.9+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:42.9+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule78"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule78"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:43.213+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:43.213+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule79"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule79"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:43.573+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:43.573+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule8"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule8"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:19.837+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:19.837+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule80"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule80"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:43.87+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:43.87+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule81"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule81"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:44.197+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:44.197+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule82"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule82"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:44.493+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:44.493+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule83"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule83"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:44.807+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:44.807+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule84"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule84"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:45.183+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:45.183+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule85"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule85"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:45.493+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:45.493+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule86"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule86"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:45.79+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:45.79+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule87"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule87"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:46.09+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:46.09+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule88"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule88"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:46.37+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:46.37+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule89"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule89"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:46.887+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:46.887+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule9"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule9"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:20.15+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:20.15+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule90"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule90"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:47.183+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:47.183+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule91"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule91"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:47.493+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:47.493+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule92"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule92"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:47.76+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:47.76+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule93"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule93"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.073+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.073+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule94"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule94"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.353+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.353+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule95"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule95"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.683+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.683+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule96"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule96"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.963+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:48.963+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule97"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule97"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:49.243+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:49.243+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule98"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule98"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:49.51+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:49.51+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }, - // { - // Name: to.Ptr("mySchedule99"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/schedules/mySchedule99"), - // Properties: &armautomation.ScheduleProperties{ - // Description: to.Ptr("my description of schedule goes here"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:49.79+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-01T17:28:00+00:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](0), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // Interval: float64(1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T17:00:49.79+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](0), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-27T18:59:00+00:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](0), - // TimeZone: to.Ptr("UTC"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go index f812199b70e9..8a47f2aa0320 100644 --- a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go +++ b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewSoftwareUpdateConfigurationMachineRunsClient(subscriptionID string, cred // GetByID - Get a single software update configuration machine run by Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - softwareUpdateConfigurationMachineRunID - The Id of the software update configuration machine run. // - options - SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.GetByID // method. func (client *SoftwareUpdateConfigurationMachineRunsClient) GetByID(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationMachineRunID string, options *SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions) (SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse, error) { + var err error req, err := client.getByIDCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationMachineRunID, options) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationMachineRunsClientGetByIDResponse{}, err } - return client.getByIDHandleResponse(resp) + resp, err := client.getByIDHandleResponse(httpResp) + return resp, err } // getByIDCreateRequest creates the GetByID request. @@ -90,7 +92,7 @@ func (client *SoftwareUpdateConfigurationMachineRunsClient) getByIDCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -111,24 +113,27 @@ func (client *SoftwareUpdateConfigurationMachineRunsClient) getByIDHandleRespons // List - Return list of software update configuration machine runs // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - SoftwareUpdateConfigurationMachineRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationMachineRunsClient.List // method. func (client *SoftwareUpdateConfigurationMachineRunsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, options *SoftwareUpdateConfigurationMachineRunsClientListOptions) (SoftwareUpdateConfigurationMachineRunsClientListResponse, error) { + var err error req, err := client.listCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationMachineRunsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -151,7 +156,7 @@ func (client *SoftwareUpdateConfigurationMachineRunsClient) listCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client_example_test.go b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client_example_test.go deleted file mode 100644 index abc61189f14e..000000000000 --- a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationmachineruns_client_example_test.go +++ /dev/null @@ -1,218 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationMachineRun/getSoftwareUpdateConfigurationMachineRunById.json -func ExampleSoftwareUpdateConfigurationMachineRunsClient_GetByID() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationMachineRunsClient().GetByID(ctx, "mygroup", "myaccount", "ca440719-34a4-4234-a1a9-3f84faf7788f", &armautomation.SoftwareUpdateConfigurationMachineRunsClientGetByIDOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationMachineRun = armautomation.SoftwareUpdateConfigurationMachineRun{ - // Name: to.Ptr("ca440719-34a4-4234-a1a9-3f84faf7788f"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationMachineRuns/ca440719-34a4-4234-a1a9-3f84faf7788f"), - // Properties: &armautomation.UpdateConfigurationMachineRunProperties{ - // ConfiguredDuration: to.Ptr("PT2H"), - // CorrelationID: to.Ptr("0b943e57-44d3-4f05-898c-6e92aa617e59"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:36.4166667+00:00"); return t}()), - // Error: &armautomation.ErrorResponse{ - // }, - // Job: &armautomation.JobNavigation{ - // }, - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:34:32.4366667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // SourceComputerID: to.Ptr("3d3f24bf-7037-424e-bfba-aae3b9752f8e"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // TargetComputer: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Compute/virtualMachines/myvm"), - // TargetComputerType: to.Ptr("AzureVirtualMachines"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRuns.json -func ExampleSoftwareUpdateConfigurationMachineRunsClient_List_listSoftwareUpdateConfigurationMachineRuns() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationMachineRunsClient().List(ctx, "mygroup", "myaccount", &armautomation.SoftwareUpdateConfigurationMachineRunsClientListOptions{ClientRequestID: nil, - Filter: nil, - Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationMachineRunListResult = armautomation.SoftwareUpdateConfigurationMachineRunListResult{ - // Value: []*armautomation.SoftwareUpdateConfigurationMachineRun{ - // { - // Name: to.Ptr("ca440719-34a4-4234-a1a9-3f84faf7788f"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationMachineRuns/ca440719-34a4-4234-a1a9-3f84faf7788f"), - // Properties: &armautomation.UpdateConfigurationMachineRunProperties{ - // ConfiguredDuration: to.Ptr("PT2H"), - // CorrelationID: to.Ptr("0b943e57-44d3-4f05-898c-6e92aa617e59"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:36.4166667+00:00"); return t}()), - // Error: &armautomation.ErrorResponse{ - // }, - // Job: &armautomation.JobNavigation{ - // }, - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:34:32.4366667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // SourceComputerID: to.Ptr("3d3f24bf-7037-424e-bfba-aae3b9752f8e"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // TargetComputer: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Compute/virtualMachines/myvm"), - // TargetComputerType: to.Ptr("AzureVirtualMachines"), - // }, - // }, - // { - // Name: to.Ptr("ca440719-34a4-4234-a1a9-3f84faf7789f"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationMachineRuns/ca440719-34a4-4234-a1a9-3f84faf7789f"), - // Properties: &armautomation.UpdateConfigurationMachineRunProperties{ - // ConfiguredDuration: to.Ptr("PT2H"), - // CorrelationID: to.Ptr("0b943e57-44d3-4f05-898c-6e92aa617e59"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:36.4166667+00:00"); return t}()), - // Error: &armautomation.ErrorResponse{ - // }, - // Job: &armautomation.JobNavigation{ - // }, - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:34:32.4366667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // SourceComputerID: to.Ptr("3d3f24bf-7037-424e-bfba-aae3b9752f8e"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // TargetComputer: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Compute/virtualMachines/myvm2"), - // TargetComputerType: to.Ptr("AzureVirtualMachines"), - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRunsByRun.json -func ExampleSoftwareUpdateConfigurationMachineRunsClient_List_listSoftwareUpdateConfigurationMachineRunsForASpecificSoftwareUpdateConfigurationRun() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationMachineRunsClient().List(ctx, "mygroup", "myaccount", &armautomation.SoftwareUpdateConfigurationMachineRunsClientListOptions{ClientRequestID: nil, - Filter: to.Ptr("$filter=properties/correlationId%20eq%200b943e57-44d3-4f05-898c-6e92aa617e59"), - Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationMachineRunListResult = armautomation.SoftwareUpdateConfigurationMachineRunListResult{ - // Value: []*armautomation.SoftwareUpdateConfigurationMachineRun{ - // { - // Name: to.Ptr("ca440719-34a4-4234-a1a9-3f84faf7788f"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationMachineRuns/ca440719-34a4-4234-a1a9-3f84faf7788f"), - // Properties: &armautomation.UpdateConfigurationMachineRunProperties{ - // ConfiguredDuration: to.Ptr("PT2H"), - // CorrelationID: to.Ptr("0b943e57-44d3-4f05-898c-6e92aa617e59"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:36.4166667+00:00"); return t}()), - // Error: &armautomation.ErrorResponse{ - // }, - // Job: &armautomation.JobNavigation{ - // }, - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:34:32.4366667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // SourceComputerID: to.Ptr("3d3f24bf-7037-424e-bfba-aae3b9752f8e"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // TargetComputer: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Compute/virtualMachines/myvm"), - // TargetComputerType: to.Ptr("AzureVirtualMachines"), - // }, - // }, - // { - // Name: to.Ptr("ca440719-34a4-4234-a1a9-3f84faf7789f"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationMachineRuns/ca440719-34a4-4234-a1a9-3f84faf7789f"), - // Properties: &armautomation.UpdateConfigurationMachineRunProperties{ - // ConfiguredDuration: to.Ptr("PT2H"), - // CorrelationID: to.Ptr("0b943e57-44d3-4f05-898c-6e92aa617e59"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:36.4166667+00:00"); return t}()), - // Error: &armautomation.ErrorResponse{ - // }, - // Job: &armautomation.JobNavigation{ - // }, - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:34:32.4366667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // SourceComputerID: to.Ptr("3d3f24bf-7037-424e-bfba-aae3b9752f8e"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:33:30.7484961+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // TargetComputer: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Compute/virtualMachines/myvm2"), - // TargetComputerType: to.Ptr("AzureVirtualMachines"), - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go index 84b7c8a48e11..97d8f8d9899d 100644 --- a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go +++ b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewSoftwareUpdateConfigurationRunsClient(subscriptionID string, credential // GetByID - Get a single software update configuration Run by Id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - softwareUpdateConfigurationRunID - The Id of the software update configuration run. // - options - SoftwareUpdateConfigurationRunsClientGetByIDOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.GetByID // method. func (client *SoftwareUpdateConfigurationRunsClient) GetByID(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationRunID string, options *SoftwareUpdateConfigurationRunsClientGetByIDOptions) (SoftwareUpdateConfigurationRunsClientGetByIDResponse, error) { + var err error req, err := client.getByIDCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationRunID, options) if err != nil { return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationRunsClientGetByIDResponse{}, err } - return client.getByIDHandleResponse(resp) + resp, err := client.getByIDHandleResponse(httpResp) + return resp, err } // getByIDCreateRequest creates the GetByID request. @@ -90,7 +92,7 @@ func (client *SoftwareUpdateConfigurationRunsClient) getByIDCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() if options != nil && options.ClientRequestID != nil { req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} @@ -111,24 +113,27 @@ func (client *SoftwareUpdateConfigurationRunsClient) getByIDHandleResponse(resp // List - Return list of software update configuration runs // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2019-06-01 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - SoftwareUpdateConfigurationRunsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationRunsClient.List // method. func (client *SoftwareUpdateConfigurationRunsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, options *SoftwareUpdateConfigurationRunsClientListOptions) (SoftwareUpdateConfigurationRunsClientListResponse, error) { + var err error req, err := client.listCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return SoftwareUpdateConfigurationRunsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationRunsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationRunsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationRunsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. @@ -151,7 +156,7 @@ func (client *SoftwareUpdateConfigurationRunsClient) listCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-06-01") + reqQP.Set("api-version", "2023-11-01") if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } diff --git a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client_example_test.go b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client_example_test.go deleted file mode 100644 index 013edb77f1a2..000000000000 --- a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurationruns_client_example_test.go +++ /dev/null @@ -1,223 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationRun/getSoftwareUpdateConfigurationRunById.json -func ExampleSoftwareUpdateConfigurationRunsClient_GetByID() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationRunsClient().GetByID(ctx, "mygroup", "myaccount", "2bd77cfa-2e9c-41b4-a45b-684a77cfeca9", &armautomation.SoftwareUpdateConfigurationRunsClientGetByIDOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationRun = armautomation.SoftwareUpdateConfigurationRun{ - // Name: to.Ptr("2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationRuns/2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"), - // Properties: &armautomation.SoftwareUpdateConfigurationRunProperties{ - // ComputerCount: to.Ptr[int32](1), - // ConfiguredDuration: to.Ptr("PT2H"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:36.2401233+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:42.8466667+00:00"); return t}()), - // FailedCount: to.Ptr[int32](0), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:31:39.3966667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:36.2401233+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // Tasks: &armautomation.SoftwareUpdateConfigurationRunTasks{ - // PreTask: &armautomation.SoftwareUpdateConfigurationRunTaskProperties{ - // JobID: to.Ptr("be430e9e-2290-462e-8f86-686407c35fab"), - // Source: to.Ptr("preRunbook"), - // Status: to.Ptr("Completed"), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationRun/listFailedSoftwareUpdateConfigurationRuns.json -func ExampleSoftwareUpdateConfigurationRunsClient_List_listSoftwareUpdateConfigurationMachineRunWithStatusEqualToFailed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationRunsClient().List(ctx, "mygroup", "myaccount", &armautomation.SoftwareUpdateConfigurationRunsClientListOptions{ClientRequestID: nil, - Filter: to.Ptr("properties/status%20eq%20'Failed'"), - Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationRunListResult = armautomation.SoftwareUpdateConfigurationRunListResult{ - // Value: []*armautomation.SoftwareUpdateConfigurationRun{ - // { - // Name: to.Ptr("2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationRuns/2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"), - // Properties: &armautomation.SoftwareUpdateConfigurationRunProperties{ - // ComputerCount: to.Ptr[int32](1), - // ConfiguredDuration: to.Ptr("PT2H"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:36.2401233+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:42.8466667+00:00"); return t}()), - // FailedCount: to.Ptr[int32](0), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:31:39.3966667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:36.2401233+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // Tasks: &armautomation.SoftwareUpdateConfigurationRunTasks{ - // PreTask: &armautomation.SoftwareUpdateConfigurationRunTaskProperties{ - // JobID: to.Ptr("be430e9e-2290-462e-8f86-686407c35fab"), - // Source: to.Ptr("preRunbook"), - // Status: to.Ptr("Completed"), - // }, - // }, - // }, - // }, - // { - // Name: to.Ptr("5dabff55-9812-4a58-af16-b0cb1d9384e8"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationRuns/5dabff55-9812-4a58-af16-b0cb1d9384e8"), - // Properties: &armautomation.SoftwareUpdateConfigurationRunProperties{ - // ComputerCount: to.Ptr[int32](1), - // ConfiguredDuration: to.Ptr("PT2H"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:33:01.8818952+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:33:08.1133333+00:00"); return t}()), - // FailedCount: to.Ptr[int32](0), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:34:03.94+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:33:01.8818952+00:00"); return t}()), - // Status: to.Ptr("Failed"), - // Tasks: &armautomation.SoftwareUpdateConfigurationRunTasks{ - // PreTask: &armautomation.SoftwareUpdateConfigurationRunTaskProperties{ - // JobID: to.Ptr("be430e9e-2290-462e-8f86-686407c35fab"), - // Source: to.Ptr("preRunbook"), - // Status: to.Ptr("Completed"), - // }, - // }, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationRun/listSoftwareUpdateConfigurationRuns.json -func ExampleSoftwareUpdateConfigurationRunsClient_List_listSoftwareUpdateConfigurationMachineRuns() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationRunsClient().List(ctx, "mygroup", "myaccount", &armautomation.SoftwareUpdateConfigurationRunsClientListOptions{ClientRequestID: nil, - Filter: nil, - Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationRunListResult = armautomation.SoftwareUpdateConfigurationRunListResult{ - // Value: []*armautomation.SoftwareUpdateConfigurationRun{ - // { - // Name: to.Ptr("2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationRuns/2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"), - // Properties: &armautomation.SoftwareUpdateConfigurationRunProperties{ - // ComputerCount: to.Ptr[int32](1), - // ConfiguredDuration: to.Ptr("PT2H"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:36.2401233+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:42.8466667+00:00"); return t}()), - // FailedCount: to.Ptr[int32](0), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:31:39.3966667+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T02:30:36.2401233+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // Tasks: &armautomation.SoftwareUpdateConfigurationRunTasks{ - // PreTask: &armautomation.SoftwareUpdateConfigurationRunTaskProperties{ - // JobID: to.Ptr("be430e9e-2290-462e-8f86-686407c35fab"), - // Source: to.Ptr("preRunbook"), - // Status: to.Ptr("Completed"), - // }, - // }, - // }, - // }, - // { - // Name: to.Ptr("5dabff55-9812-4a58-af16-b0cb1d9384e8"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurationRuns/5dabff55-9812-4a58-af16-b0cb1d9384e8"), - // Properties: &armautomation.SoftwareUpdateConfigurationRunProperties{ - // ComputerCount: to.Ptr[int32](1), - // ConfiguredDuration: to.Ptr("PT2H"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:33:01.8818952+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:33:08.1133333+00:00"); return t}()), - // FailedCount: to.Ptr[int32](0), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:34:03.94+00:00"); return t}()), - // OSType: to.Ptr("Windows"), - // SoftwareUpdateConfiguration: &armautomation.UpdateConfigurationNavigation{ - // Name: to.Ptr("mypatch"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T01:33:01.8818952+00:00"); return t}()), - // Status: to.Ptr("Succeeded"), - // Tasks: &armautomation.SoftwareUpdateConfigurationRunTasks{ - // PreTask: &armautomation.SoftwareUpdateConfigurationRunTaskProperties{ - // JobID: to.Ptr("be430e9e-2290-462e-8f86-686407c35fab"), - // Source: to.Ptr("preRunbook"), - // Status: to.Ptr("Completed"), - // }, - // }, - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go index 7754fd3c488b..ef9f66040688 100644 --- a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go +++ b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -56,18 +55,21 @@ func NewSoftwareUpdateConfigurationsClient(subscriptionID string, credential azc // - options - SoftwareUpdateConfigurationsClientCreateOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Create // method. func (client *SoftwareUpdateConfigurationsClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, parameters SoftwareUpdateConfiguration, options *SoftwareUpdateConfigurationsClientCreateOptions) (SoftwareUpdateConfigurationsClientCreateResponse, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options) if err != nil { return SoftwareUpdateConfigurationsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SoftwareUpdateConfigurationsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -100,7 +102,10 @@ func (client *SoftwareUpdateConfigurationsClient) createCreateRequest(ctx contex req.Raw().Header["clientRequestId"] = []string{*options.ClientRequestID} } req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -122,16 +127,18 @@ func (client *SoftwareUpdateConfigurationsClient) createHandleResponse(resp *htt // - options - SoftwareUpdateConfigurationsClientDeleteOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.Delete // method. func (client *SoftwareUpdateConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, options *SoftwareUpdateConfigurationsClientDeleteOptions) (SoftwareUpdateConfigurationsClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) if err != nil { return SoftwareUpdateConfigurationsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SoftwareUpdateConfigurationsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientDeleteResponse{}, err } return SoftwareUpdateConfigurationsClientDeleteResponse{}, nil } @@ -179,18 +186,21 @@ func (client *SoftwareUpdateConfigurationsClient) deleteCreateRequest(ctx contex // - options - SoftwareUpdateConfigurationsClientGetByNameOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.GetByName // method. func (client *SoftwareUpdateConfigurationsClient) GetByName(ctx context.Context, resourceGroupName string, automationAccountName string, softwareUpdateConfigurationName string, options *SoftwareUpdateConfigurationsClientGetByNameOptions) (SoftwareUpdateConfigurationsClientGetByNameResponse, error) { + var err error req, err := client.getByNameCreateRequest(ctx, resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options) if err != nil { return SoftwareUpdateConfigurationsClientGetByNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientGetByNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationsClientGetByNameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientGetByNameResponse{}, err } - return client.getByNameHandleResponse(resp) + resp, err := client.getByNameHandleResponse(httpResp) + return resp, err } // getByNameCreateRequest creates the GetByName request. @@ -244,18 +254,21 @@ func (client *SoftwareUpdateConfigurationsClient) getByNameHandleResponse(resp * // - options - SoftwareUpdateConfigurationsClientListOptions contains the optional parameters for the SoftwareUpdateConfigurationsClient.List // method. func (client *SoftwareUpdateConfigurationsClient) List(ctx context.Context, resourceGroupName string, automationAccountName string, options *SoftwareUpdateConfigurationsClientListOptions) (SoftwareUpdateConfigurationsClientListResponse, error) { + var err error req, err := client.listCreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return SoftwareUpdateConfigurationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SoftwareUpdateConfigurationsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SoftwareUpdateConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SoftwareUpdateConfigurationsClientListResponse{}, err } - return client.listHandleResponse(resp) + resp, err := client.listHandleResponse(httpResp) + return resp, err } // listCreateRequest creates the List request. diff --git a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client_example_test.go b/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client_example_test.go deleted file mode 100644 index 4ea712761ccf..000000000000 --- a/sdk/resourcemanager/automation/armautomation/softwareupdateconfigurations_client_example_test.go +++ /dev/null @@ -1,541 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/createSoftwareUpdateConfiguration.json -func ExampleSoftwareUpdateConfigurationsClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationsClient().Create(ctx, "mygroup", "myaccount", "testpatch", armautomation.SoftwareUpdateConfiguration{ - Properties: &armautomation.SoftwareUpdateConfigurationProperties{ - ScheduleInfo: &armautomation.SUCScheduleProperties{ - AdvancedSchedule: &armautomation.AdvancedSchedule{ - WeekDays: []*string{ - to.Ptr("Monday"), - to.Ptr("Thursday")}, - }, - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-09T11:22:57+00:00"); return t }()), - Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - Interval: to.Ptr[int64](1), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T12:22:57+00:00"); return t }()), - TimeZone: to.Ptr("America/Los_Angeles"), - }, - Tasks: &armautomation.SoftwareUpdateConfigurationTasks{ - PostTask: &armautomation.TaskProperties{ - Source: to.Ptr("GetCache"), - }, - PreTask: &armautomation.TaskProperties{ - Parameters: map[string]*string{ - "COMPUTERNAME": to.Ptr("Computer1"), - }, - Source: to.Ptr("HelloWorld"), - }, - }, - UpdateConfiguration: &armautomation.UpdateConfiguration{ - AzureVirtualMachines: []*string{ - to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01"), - to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02"), - to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03")}, - Duration: to.Ptr("PT2H0M"), - NonAzureComputerNames: []*string{ - to.Ptr("box1.contoso.com"), - to.Ptr("box2.contoso.com")}, - OperatingSystem: to.Ptr(armautomation.OperatingSystemTypeWindows), - Targets: &armautomation.TargetProperties{ - AzureQueries: []*armautomation.AzureQueryProperties{ - { - Locations: []*string{ - to.Ptr("Japan East"), - to.Ptr("UK South")}, - Scope: []*string{ - to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources"), - to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067")}, - TagSettings: &armautomation.TagSettingsProperties{ - FilterOperator: to.Ptr(armautomation.TagOperatorsAll), - Tags: map[string][]*string{ - "tag1": { - to.Ptr("tag1Value1"), - to.Ptr("tag1Value2"), - to.Ptr("tag1Value3")}, - "tag2": { - to.Ptr("tag2Value1"), - to.Ptr("tag2Value2"), - to.Ptr("tag2Value3")}, - }, - }, - }}, - NonAzureQueries: []*armautomation.NonAzureQueryProperties{ - { - FunctionAlias: to.Ptr("SavedSearch1"), - WorkspaceID: to.Ptr("WorkspaceId1"), - }, - { - FunctionAlias: to.Ptr("SavedSearch2"), - WorkspaceID: to.Ptr("WorkspaceId2"), - }}, - }, - Windows: &armautomation.WindowsProperties{ - ExcludedKbNumbers: []*string{ - to.Ptr("168934"), - to.Ptr("168973")}, - IncludedUpdateClassifications: to.Ptr(armautomation.WindowsUpdateClassesCritical), - RebootSetting: to.Ptr("IfRequired"), - }, - }, - }, - }, &armautomation.SoftwareUpdateConfigurationsClientCreateOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfiguration = armautomation.SoftwareUpdateConfiguration{ - // Name: to.Ptr("testpatch"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurations/testpatch"), - // Properties: &armautomation.SoftwareUpdateConfigurationProperties{ - // CreatedBy: to.Ptr("adam@contoso.com"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // Error: &armautomation.ErrorResponse{ - // }, - // LastModifiedBy: to.Ptr("adam@contoso.com"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.68+00:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // ScheduleInfo: &armautomation.SUCScheduleProperties{ - // Description: to.Ptr(""), - // AdvancedSchedule: &armautomation.AdvancedSchedule{ - // }, - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-09T11:22:00-08:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](-480), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyWeek), - // Interval: to.Ptr[int64](1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T12:22:00-07:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](-420), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T12:22:00-07:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](-420), - // TimeZone: to.Ptr("America/Los_Angeles"), - // }, - // Tasks: &armautomation.SoftwareUpdateConfigurationTasks{ - // PostTask: &armautomation.TaskProperties{ - // Source: to.Ptr("GetCache"), - // }, - // PreTask: &armautomation.TaskProperties{ - // Parameters: map[string]*string{ - // "COMPUTERNAME": to.Ptr("Computer1"), - // }, - // Source: to.Ptr("HelloWorld"), - // }, - // }, - // UpdateConfiguration: &armautomation.UpdateConfiguration{ - // AzureVirtualMachines: []*string{ - // to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01"), - // to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02"), - // to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03")}, - // Duration: to.Ptr("PT2H"), - // Linux: &armautomation.LinuxProperties{ - // }, - // NonAzureComputerNames: []*string{ - // to.Ptr("box1.contoso.com"), - // to.Ptr("box2.contoso.com")}, - // OperatingSystem: to.Ptr(armautomation.OperatingSystemTypeWindows), - // Targets: &armautomation.TargetProperties{ - // AzureQueries: []*armautomation.AzureQueryProperties{ - // { - // Locations: []*string{ - // to.Ptr("Japan East"), - // to.Ptr("UK South")}, - // Scope: []*string{ - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0"), - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d")}, - // TagSettings: &armautomation.TagSettingsProperties{ - // FilterOperator: to.Ptr(armautomation.TagOperatorsAll), - // Tags: map[string][]*string{ - // "tag1": []*string{ - // to.Ptr("tag1Value1"), - // to.Ptr("tag1Value2")}, - // "tag2": []*string{ - // to.Ptr("tag2Value1"), - // to.Ptr("tag2Value2")}, - // }, - // }, - // }}, - // }, - // Windows: &armautomation.WindowsProperties{ - // ExcludedKbNumbers: []*string{ - // to.Ptr("168934"), - // to.Ptr("168973")}, - // IncludedUpdateClassifications: to.Ptr(armautomation.WindowsUpdateClassesCritical), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json -func ExampleSoftwareUpdateConfigurationsClient_GetByName() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationsClient().GetByName(ctx, "mygroup", "myaccount", "mypatch", &armautomation.SoftwareUpdateConfigurationsClientGetByNameOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfiguration = armautomation.SoftwareUpdateConfiguration{ - // Name: to.Ptr("testpatch"), - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurations/testpatch"), - // Properties: &armautomation.SoftwareUpdateConfigurationProperties{ - // CreatedBy: to.Ptr("eve@contoso.com"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // Error: &armautomation.ErrorResponse{ - // }, - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.68+00:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // ScheduleInfo: &armautomation.SUCScheduleProperties{ - // Description: to.Ptr(""), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-09T11:22:00-08:00"); return t}()), - // ExpiryTimeOffsetMinutes: to.Ptr[float64](-480), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyWeek), - // Interval: to.Ptr[int64](1), - // IsEnabled: to.Ptr(true), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T12:22:00-07:00"); return t}()), - // NextRunOffsetMinutes: to.Ptr[float64](-420), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T12:22:00-07:00"); return t}()), - // StartTimeOffsetMinutes: to.Ptr[float64](-420), - // TimeZone: to.Ptr("America/Los_Angeles"), - // }, - // Tasks: &armautomation.SoftwareUpdateConfigurationTasks{ - // PostTask: &armautomation.TaskProperties{ - // Source: to.Ptr("GetCache"), - // }, - // PreTask: &armautomation.TaskProperties{ - // Parameters: map[string]*string{ - // "COMPUTERNAME": to.Ptr("Computer1"), - // }, - // Source: to.Ptr("HelloWorld"), - // }, - // }, - // UpdateConfiguration: &armautomation.UpdateConfiguration{ - // AzureVirtualMachines: []*string{ - // to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01"), - // to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02"), - // to.Ptr("/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03")}, - // Duration: to.Ptr("PT2H"), - // Linux: &armautomation.LinuxProperties{ - // }, - // NonAzureComputerNames: []*string{ - // to.Ptr("box1.contoso.com"), - // to.Ptr("box2.contoso.com")}, - // OperatingSystem: to.Ptr(armautomation.OperatingSystemTypeWindows), - // Targets: &armautomation.TargetProperties{ - // AzureQueries: []*armautomation.AzureQueryProperties{ - // { - // Scope: []*string{ - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0"), - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d")}, - // TagSettings: &armautomation.TagSettingsProperties{ - // FilterOperator: to.Ptr(armautomation.TagOperatorsAll), - // Tags: map[string][]*string{ - // "tag1": []*string{ - // to.Ptr("tag1Value1"), - // to.Ptr("tag1Value2")}, - // "tag2": []*string{ - // to.Ptr("tag2Value1"), - // to.Ptr("tag2Value2")}, - // }, - // }, - // }}, - // }, - // Windows: &armautomation.WindowsProperties{ - // ExcludedKbNumbers: []*string{ - // to.Ptr("168934"), - // to.Ptr("168973")}, - // IncludedUpdateClassifications: to.Ptr(armautomation.WindowsUpdateClassesCritical), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/deleteSoftwareUpdateConfiguration.json -func ExampleSoftwareUpdateConfigurationsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSoftwareUpdateConfigurationsClient().Delete(ctx, "mygroup", "myaccount", "mypatch", &armautomation.SoftwareUpdateConfigurationsClientDeleteOptions{ClientRequestID: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurations.json -func ExampleSoftwareUpdateConfigurationsClient_List_listSoftwareUpdateConfigurations() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationsClient().List(ctx, "mygroup", "myaccount", &armautomation.SoftwareUpdateConfigurationsClientListOptions{ClientRequestID: nil, - Filter: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationListResult = armautomation.SoftwareUpdateConfigurationListResult{ - // Value: []*armautomation.SoftwareUpdateConfigurationCollectionItem{ - // { - // Name: to.Ptr("testpatch-01"), - // ID: to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/Mo-Resources-WCUS/providers/Microsoft.Automation/automationAccounts/Mo-AAA-WCUS/softwareUpdateConfigurations/testpatch-01"), - // Properties: &armautomation.SoftwareUpdateConfigurationCollectionItemProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyWeek), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.68+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T12:22:00-07:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T12:22:00-07:00"); return t}()), - // Tasks: &armautomation.SoftwareUpdateConfigurationTasks{ - // PostTask: &armautomation.TaskProperties{ - // Source: to.Ptr("GetCache"), - // }, - // PreTask: &armautomation.TaskProperties{ - // Parameters: map[string]*string{ - // "COMPUTERNAME": to.Ptr("Computer1"), - // }, - // Source: to.Ptr("HelloWorld"), - // }, - // }, - // UpdateConfiguration: &armautomation.UpdateConfiguration{ - // AzureVirtualMachines: []*string{ - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03")}, - // Duration: to.Ptr("PT2H"), - // OperatingSystem: to.Ptr(armautomation.OperatingSystemTypeWindows), - // Targets: &armautomation.TargetProperties{ - // AzureQueries: []*armautomation.AzureQueryProperties{ - // { - // Scope: []*string{ - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0"), - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d")}, - // TagSettings: &armautomation.TagSettingsProperties{ - // FilterOperator: to.Ptr(armautomation.TagOperatorsAll), - // Tags: map[string][]*string{ - // "tag1": []*string{ - // to.Ptr("tag1Value1"), - // to.Ptr("tag1Value2")}, - // "tag2": []*string{ - // to.Ptr("tag2Value1"), - // to.Ptr("tag2Value2")}, - // }, - // }, - // }}, - // }, - // Windows: &armautomation.WindowsProperties{ - // IncludedUpdateClassifications: to.Ptr(armautomation.WindowsUpdateClasses("Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates")), - // }, - // }, - // }, - // }, - // { - // Name: to.Ptr("testpatch-02"), - // ID: to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/Mo-Resources-WCUS/providers/Microsoft.Automation/automationAccounts/Mo-AAA-WCUS/softwareUpdateConfigurations/testpatch-02"), - // Properties: &armautomation.SoftwareUpdateConfigurationCollectionItemProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-11T21:52:02.7733333+00:00"); return t}()), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-11T21:52:22.88+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-05T12:26:00-07:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-05T12:26:00-07:00"); return t}()), - // Tasks: &armautomation.SoftwareUpdateConfigurationTasks{ - // PostTask: &armautomation.TaskProperties{ - // Source: to.Ptr("GetCache"), - // }, - // PreTask: &armautomation.TaskProperties{ - // Parameters: map[string]*string{ - // "COMPUTERNAME": to.Ptr("Computer1"), - // }, - // Source: to.Ptr("HelloWorld"), - // }, - // }, - // UpdateConfiguration: &armautomation.UpdateConfiguration{ - // AzureVirtualMachines: []*string{ - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-04"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-05"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-06")}, - // Duration: to.Ptr("PT2H30M"), - // OperatingSystem: to.Ptr(armautomation.OperatingSystemTypeWindows), - // Targets: &armautomation.TargetProperties{ - // AzureQueries: []*armautomation.AzureQueryProperties{ - // { - // Locations: []*string{ - // to.Ptr("Japan East"), - // to.Ptr("UK South")}, - // Scope: []*string{ - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0"), - // to.Ptr("/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d")}, - // TagSettings: &armautomation.TagSettingsProperties{ - // FilterOperator: to.Ptr(armautomation.TagOperatorsAll), - // Tags: map[string][]*string{ - // "tag1": []*string{ - // to.Ptr("tag1Value1"), - // to.Ptr("tag1Value2")}, - // "tag2": []*string{ - // to.Ptr("tag2Value1"), - // to.Ptr("tag2Value2")}, - // }, - // }, - // }}, - // }, - // Windows: &armautomation.WindowsProperties{ - // IncludedUpdateClassifications: to.Ptr(armautomation.WindowsUpdateClasses("Critical, FeaturePack")), - // }, - // }, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurationsByVm.json -func ExampleSoftwareUpdateConfigurationsClient_List_listSoftwareUpdateConfigurationsTargetingASpecificAzureVirtualMachine() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSoftwareUpdateConfigurationsClient().List(ctx, "mygroup", "myaccount", &armautomation.SoftwareUpdateConfigurationsClientListOptions{ClientRequestID: nil, - Filter: to.Ptr("properties/updateConfiguration/azureVirtualMachines/any(m: m eq '/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01')"), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SoftwareUpdateConfigurationListResult = armautomation.SoftwareUpdateConfigurationListResult{ - // Value: []*armautomation.SoftwareUpdateConfigurationCollectionItem{ - // { - // Name: to.Ptr("testpatch-01"), - // ID: to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/Mo-Resources-WCUS/providers/Microsoft.Automation/automationAccounts/Mo-AAA-WCUS/softwareUpdateConfigurations/testpatch-01"), - // Properties: &armautomation.SoftwareUpdateConfigurationCollectionItemProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.5233333+00:00"); return t}()), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyWeek), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T18:54:50.68+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-23T12:22:00-07:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-19T12:22:00-07:00"); return t}()), - // Tasks: &armautomation.SoftwareUpdateConfigurationTasks{ - // PostTask: &armautomation.TaskProperties{ - // Source: to.Ptr("GetCache"), - // }, - // PreTask: &armautomation.TaskProperties{ - // Parameters: map[string]*string{ - // "COMPUTERNAME": to.Ptr("Computer1"), - // }, - // Source: to.Ptr("HelloWorld"), - // }, - // }, - // UpdateConfiguration: &armautomation.UpdateConfiguration{ - // AzureVirtualMachines: []*string{ - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03")}, - // Duration: to.Ptr("PT2H"), - // OperatingSystem: to.Ptr(armautomation.OperatingSystemTypeWindows), - // Windows: &armautomation.WindowsProperties{ - // IncludedUpdateClassifications: to.Ptr(armautomation.WindowsUpdateClasses("Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates")), - // }, - // }, - // }, - // }, - // { - // Name: to.Ptr("testpatch-02"), - // ID: to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/Mo-Resources-WCUS/providers/Microsoft.Automation/automationAccounts/Mo-AAA-WCUS/softwareUpdateConfigurations/testpatch-02"), - // Properties: &armautomation.SoftwareUpdateConfigurationCollectionItemProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-11T21:52:02.7733333+00:00"); return t}()), - // Frequency: to.Ptr(armautomation.ScheduleFrequencyHour), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-11T21:52:22.88+00:00"); return t}()), - // NextRun: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-05T12:26:00-07:00"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-05T12:26:00-07:00"); return t}()), - // Tasks: &armautomation.SoftwareUpdateConfigurationTasks{ - // PostTask: &armautomation.TaskProperties{ - // Source: to.Ptr("GetCache"), - // }, - // PreTask: &armautomation.TaskProperties{ - // Parameters: map[string]*string{ - // "COMPUTERNAME": to.Ptr("Computer1"), - // }, - // Source: to.Ptr("HelloWorld"), - // }, - // }, - // UpdateConfiguration: &armautomation.UpdateConfiguration{ - // AzureVirtualMachines: []*string{ - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-05"), - // to.Ptr("/subscriptions/1a7d4044-286c-4acb-969a-96639265bf2e/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-06")}, - // Duration: to.Ptr("PT2H30M"), - // OperatingSystem: to.Ptr(armautomation.OperatingSystemTypeWindows), - // Windows: &armautomation.WindowsProperties{ - // IncludedUpdateClassifications: to.Ptr(armautomation.WindowsUpdateClasses("Critical, FeaturePack")), - // }, - // }, - // }, - // }}, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go b/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go index 19ad7a30d75e..f9ca6beb71c7 100644 --- a/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go +++ b/sdk/resourcemanager/automation/armautomation/sourcecontrol_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewSourceControlClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Create a source control. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The source control name. @@ -56,18 +55,21 @@ func NewSourceControlClient(subscriptionID string, credential azcore.TokenCreden // - options - SourceControlClientCreateOrUpdateOptions contains the optional parameters for the SourceControlClient.CreateOrUpdate // method. func (client *SourceControlClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlCreateOrUpdateParameters, options *SourceControlClientCreateOrUpdateOptions) (SourceControlClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, parameters, options) if err != nil { return SourceControlClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SourceControlClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,10 +96,13 @@ func (client *SourceControlClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -112,22 +117,24 @@ func (client *SourceControlClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Delete the source control. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The name of source control. // - options - SourceControlClientDeleteOptions contains the optional parameters for the SourceControlClient.Delete method. func (client *SourceControlClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, options *SourceControlClientDeleteOptions) (SourceControlClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, options) if err != nil { return SourceControlClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientDeleteResponse{}, err } return SourceControlClientDeleteResponse{}, nil } @@ -156,7 +163,7 @@ func (client *SourceControlClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -165,24 +172,27 @@ func (client *SourceControlClient) deleteCreateRequest(ctx context.Context, reso // Get - Retrieve the source control identified by source control name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The name of source control. // - options - SourceControlClientGetOptions contains the optional parameters for the SourceControlClient.Get method. func (client *SourceControlClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, options *SourceControlClientGetOptions) (SourceControlClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, options) if err != nil { return SourceControlClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -209,7 +219,7 @@ func (client *SourceControlClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,7 +236,7 @@ func (client *SourceControlClient) getHandleResponse(resp *http.Response) (Sourc // NewListByAutomationAccountPager - Retrieve a list of source controls. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - SourceControlClientListByAutomationAccountOptions contains the optional parameters for the SourceControlClient.NewListByAutomationAccountPager @@ -282,7 +292,7 @@ func (client *SourceControlClient) listByAutomationAccountCreateRequest(ctx cont if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -300,25 +310,28 @@ func (client *SourceControlClient) listByAutomationAccountHandleResponse(resp *h // Update - Update a source control. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The source control name. // - parameters - The parameters supplied to the update source control operation. // - options - SourceControlClientUpdateOptions contains the optional parameters for the SourceControlClient.Update method. func (client *SourceControlClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, parameters SourceControlUpdateParameters, options *SourceControlClientUpdateOptions) (SourceControlClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, parameters, options) if err != nil { return SourceControlClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -345,10 +358,13 @@ func (client *SourceControlClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/sourcecontrol_client_example_test.go b/sdk/resourcemanager/automation/armautomation/sourcecontrol_client_example_test.go deleted file mode 100644 index 97310cebf827..000000000000 --- a/sdk/resourcemanager/automation/armautomation/sourcecontrol_client_example_test.go +++ /dev/null @@ -1,270 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/createOrUpdateSourceControl.json -func ExampleSourceControlClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSourceControlClient().CreateOrUpdate(ctx, "rg", "sampleAccount9", "sampleSourceControl", armautomation.SourceControlCreateOrUpdateParameters{ - Properties: &armautomation.SourceControlCreateOrUpdateProperties{ - Description: to.Ptr("my description"), - AutoSync: to.Ptr(true), - Branch: to.Ptr("master"), - FolderPath: to.Ptr("/folderOne/folderTwo"), - PublishRunbook: to.Ptr(true), - RepoURL: to.Ptr("https://sampleUser.visualstudio.com/myProject/_git/myRepository"), - SecurityToken: &armautomation.SourceControlSecurityTokenProperties{ - AccessToken: to.Ptr("3a326f7a0dcd343ea58fee21f2fd5fb4c1234567"), - TokenType: to.Ptr(armautomation.TokenTypePersonalAccessToken), - }, - SourceType: to.Ptr(armautomation.SourceTypeVsoGit), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SourceControl = armautomation.SourceControl{ - // Name: to.Ptr("sampleSourceControl"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/folderOne/folderTwo"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://sampleUser.visualstudio.com/myProject/_git/myRepository"), - // SourceType: to.Ptr(armautomation.SourceTypeVsoGit), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/updateSourceControl_patch.json -func ExampleSourceControlClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSourceControlClient().Update(ctx, "rg", "sampleAccount9", "sampleSourceControl", armautomation.SourceControlUpdateParameters{ - Properties: &armautomation.SourceControlUpdateProperties{ - Description: to.Ptr("my description"), - AutoSync: to.Ptr(true), - Branch: to.Ptr("master"), - FolderPath: to.Ptr("/folderOne/folderTwo"), - PublishRunbook: to.Ptr(true), - SecurityToken: &armautomation.SourceControlSecurityTokenProperties{ - AccessToken: to.Ptr("3a326f7a0dcd343ea58fee21f2fd5fb4c1234567"), - TokenType: to.Ptr(armautomation.TokenTypePersonalAccessToken), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SourceControl = armautomation.SourceControl{ - // Name: to.Ptr("sampleSourceControl"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/folderOne/folderTwo"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://sampleUser.visualstudio.com/myProject/_git/myRepository"), - // SourceType: to.Ptr(armautomation.SourceTypeVsoGit), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/deleteSourceControl.json -func ExampleSourceControlClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSourceControlClient().Delete(ctx, "rg", "sampleAccount9", "sampleSourceControl", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/getSourceControl.json -func ExampleSourceControlClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSourceControlClient().Get(ctx, "rg", "sampleAccount9", "sampleSourceControl", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SourceControl = armautomation.SourceControl{ - // Name: to.Ptr("sampleSourceControl"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/folderOne/folderTwo"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://github.com/SampleUserRepro/PowerShell"), - // SourceType: to.Ptr(armautomation.SourceTypeGitHub), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/getAllSourceControls.json -func ExampleSourceControlClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSourceControlClient().NewListByAutomationAccountPager("rg", "sampleAccount9", &armautomation.SourceControlClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SourceControlListResult = armautomation.SourceControlListResult{ - // Value: []*armautomation.SourceControl{ - // { - // Name: to.Ptr("sampleSourceControl1"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl1"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/sampleFolder/sampleFolder2"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://github.com/SampleUserRepro/PowerShell-1"), - // SourceType: to.Ptr(armautomation.SourceTypeGitHub), - // }, - // }, - // { - // Name: to.Ptr("sampleSourceControl2"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl2"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/sampleFolder/sampleFolder2"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://github.com/SampleUserRepro/PowerShell-2"), - // SourceType: to.Ptr(armautomation.SourceTypeGitHub), - // }, - // }, - // { - // Name: to.Ptr("sampleSourceControl3"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl3"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/sampleFolder/sampleFolder2"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://github.com/SampleUserRepro/PowerShell-3"), - // SourceType: to.Ptr(armautomation.SourceTypeGitHub), - // }, - // }, - // { - // Name: to.Ptr("sampleSourceControl4"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl4"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/sampleFolder/sampleFolder2"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://github.com/SampleUserRepro/PowerShell-4"), - // SourceType: to.Ptr(armautomation.SourceTypeGitHub), - // }, - // }, - // { - // Name: to.Ptr("sampleSourceControl5"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl5"), - // Properties: &armautomation.SourceControlProperties{ - // Description: to.Ptr("my description"), - // AutoSync: to.Ptr(true), - // Branch: to.Ptr("master"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // FolderPath: to.Ptr("/sampleFolder/sampleFolder2"), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // PublishRunbook: to.Ptr(true), - // RepoURL: to.Ptr("https://github.com/SampleUserRepro/PowerShell-5"), - // SourceType: to.Ptr(armautomation.SourceTypeGitHub), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go b/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go index 003172020066..90951c08dbd3 100644 --- a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go +++ b/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewSourceControlSyncJobClient(subscriptionID string, credential azcore.Toke // Create - Creates the sync job for a source control. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The source control name. @@ -57,18 +56,21 @@ func NewSourceControlSyncJobClient(subscriptionID string, credential azcore.Toke // - options - SourceControlSyncJobClientCreateOptions contains the optional parameters for the SourceControlSyncJobClient.Create // method. func (client *SourceControlSyncJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID string, parameters SourceControlSyncJobCreateParameters, options *SourceControlSyncJobClientCreateOptions) (SourceControlSyncJobClientCreateResponse, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID, parameters, options) if err != nil { return SourceControlSyncJobClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlSyncJobClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return SourceControlSyncJobClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SourceControlSyncJobClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -96,10 +98,13 @@ func (client *SourceControlSyncJobClient) createCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -114,7 +119,7 @@ func (client *SourceControlSyncJobClient) createHandleResponse(resp *http.Respon // Get - Retrieve the source control sync job identified by job id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The source control name. @@ -122,18 +127,21 @@ func (client *SourceControlSyncJobClient) createHandleResponse(resp *http.Respon // - options - SourceControlSyncJobClientGetOptions contains the optional parameters for the SourceControlSyncJobClient.Get // method. func (client *SourceControlSyncJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID string, options *SourceControlSyncJobClientGetOptions) (SourceControlSyncJobClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID, options) if err != nil { return SourceControlSyncJobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlSyncJobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlSyncJobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlSyncJobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -161,7 +169,7 @@ func (client *SourceControlSyncJobClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,7 +186,7 @@ func (client *SourceControlSyncJobClient) getHandleResponse(resp *http.Response) // NewListByAutomationAccountPager - Retrieve a list of source control sync jobs. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The source control name. @@ -239,7 +247,7 @@ func (client *SourceControlSyncJobClient) listByAutomationAccountCreateRequest(c if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client_example_test.go b/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client_example_test.go deleted file mode 100644 index 57c35c325777..000000000000 --- a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjob_client_example_test.go +++ /dev/null @@ -1,155 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJob/createSourceControlSyncJob.json -func ExampleSourceControlSyncJobClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewSourceControlSyncJobClient().Create(ctx, "rg", "myAutomationAccount33", "MySourceControl", "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a", armautomation.SourceControlSyncJobCreateParameters{ - Properties: &armautomation.SourceControlSyncJobCreateProperties{ - CommitID: to.Ptr("9de0980bfb45026a3d97a1b0522d98a9f604226e"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJob/getSourceControlSyncJob.json -func ExampleSourceControlSyncJobClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSourceControlSyncJobClient().Get(ctx, "rg", "myAutomationAccount33", "MySourceControl", "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SourceControlSyncJobByID = armautomation.SourceControlSyncJobByID{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a"), - // Properties: &armautomation.SourceControlSyncJobByIDProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:28.903+00:00"); return t}()), - // Exception: to.Ptr(""), - // ProvisioningState: to.Ptr(armautomation.ProvisioningState("Succeeded")), - // SourceControlSyncJobID: to.Ptr("ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:27.903+00:00"); return t}()), - // SyncType: to.Ptr(armautomation.SyncTypePartialSync), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJob/getAllSourceControlSyncJobs.json -func ExampleSourceControlSyncJobClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSourceControlSyncJobClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", "MySourceControl", &armautomation.SourceControlSyncJobClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SourceControlSyncJobListResult = armautomation.SourceControlSyncJobListResult{ - // Value: []*armautomation.SourceControlSyncJob{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a1a"), - // Properties: &armautomation.SourceControlSyncJobProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:28.903+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ProvisioningState("Succeeded")), - // SourceControlSyncJobID: to.Ptr("ce6fe3e3-9db3-4096-a6b4-82bfb4c10a1a"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:27.903+00:00"); return t}()), - // SyncType: to.Ptr(armautomation.SyncTypePartialSync), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2a"), - // Properties: &armautomation.SourceControlSyncJobProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:28.903+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ProvisioningState("Succeeded")), - // SourceControlSyncJobID: to.Ptr("ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2a"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:27.903+00:00"); return t}()), - // SyncType: to.Ptr(armautomation.SyncTypePartialSync), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a3a"), - // Properties: &armautomation.SourceControlSyncJobProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:28.903+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ProvisioningState("Succeeded")), - // SourceControlSyncJobID: to.Ptr("ce6fe3e3-9db3-4096-a6b4-82bfb4c10a3a"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:27.903+00:00"); return t}()), - // SyncType: to.Ptr(armautomation.SyncTypePartialSync), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a4a"), - // Properties: &armautomation.SourceControlSyncJobProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:28.903+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ProvisioningState("Succeeded")), - // SourceControlSyncJobID: to.Ptr("ce6fe3e3-9db3-4096-a6b4-82bfb4c10a4a"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:27.903+00:00"); return t}()), - // SyncType: to.Ptr(armautomation.SyncTypePartialSync), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a5a"), - // Properties: &armautomation.SourceControlSyncJobProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:28.903+00:00"); return t}()), - // ProvisioningState: to.Ptr(armautomation.ProvisioningState("Succeeded")), - // SourceControlSyncJobID: to.Ptr("ce6fe3e3-9db3-4096-a6b4-82bfb4c10a5a"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:27.903+00:00"); return t}()), - // SyncType: to.Ptr(armautomation.SyncTypePartialSync), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go b/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go index 132779b43239..348c4e19e039 100644 --- a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go +++ b/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,7 +47,7 @@ func NewSourceControlSyncJobStreamsClient(subscriptionID string, credential azco // Get - Retrieve a sync job stream identified by stream id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The source control name. @@ -57,18 +56,21 @@ func NewSourceControlSyncJobStreamsClient(subscriptionID string, credential azco // - options - SourceControlSyncJobStreamsClientGetOptions contains the optional parameters for the SourceControlSyncJobStreamsClient.Get // method. func (client *SourceControlSyncJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, sourceControlName string, sourceControlSyncJobID string, streamID string, options *SourceControlSyncJobStreamsClientGetOptions) (SourceControlSyncJobStreamsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, sourceControlName, sourceControlSyncJobID, streamID, options) if err != nil { return SourceControlSyncJobStreamsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SourceControlSyncJobStreamsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SourceControlSyncJobStreamsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SourceControlSyncJobStreamsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -100,7 +102,7 @@ func (client *SourceControlSyncJobStreamsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -117,7 +119,7 @@ func (client *SourceControlSyncJobStreamsClient) getHandleResponse(resp *http.Re // NewListBySyncJobPager - Retrieve a list of sync job streams identified by sync job id. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - sourceControlName - The source control name. @@ -180,7 +182,7 @@ func (client *SourceControlSyncJobStreamsClient) listBySyncJobCreateRequest(ctx if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client_example_test.go b/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client_example_test.go deleted file mode 100644 index a7879cf35268..000000000000 --- a/sdk/resourcemanager/automation/armautomation/sourcecontrolsyncjobstreams_client_example_test.go +++ /dev/null @@ -1,108 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreams.json -func ExampleSourceControlSyncJobStreamsClient_NewListBySyncJobPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSourceControlSyncJobStreamsClient().NewListBySyncJobPager("rg", "myAutomationAccount33", "MySourceControl", "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2b", &armautomation.SourceControlSyncJobStreamsClientListBySyncJobOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SourceControlSyncJobStreamsListBySyncJob = armautomation.SourceControlSyncJobStreamsListBySyncJob{ - // Value: []*armautomation.SourceControlSyncJobStream{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2b/streams/b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855134810785_00000000000000000005"), - // Properties: &armautomation.SourceControlSyncJobStreamProperties{ - // SourceControlSyncJobStreamID: to.Ptr("b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855134810785_00000000000000000005"), - // StreamType: to.Ptr(armautomation.StreamTypeError), - // Summary: to.Ptr("ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription."), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2b/streams/b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855136998262_00000000000000000006"), - // Properties: &armautomation.SourceControlSyncJobStreamProperties{ - // SourceControlSyncJobStreamID: to.Ptr("b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855136998262_00000000000000000006"), - // StreamType: to.Ptr(armautomation.StreamTypeError), - // Summary: to.Ptr("System.Management.Automation.RuntimeException: Cannot index into a null array.\r\n at CallSite.Target(Closure , CallSite , Object , Int32 )\r\n at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)\r\n at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)\r\n at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:27.903+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2b/streams/b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855139029522_00000000000000000007"), - // Properties: &armautomation.SourceControlSyncJobStreamProperties{ - // SourceControlSyncJobStreamID: to.Ptr("b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855139029522_00000000000000000007"), - // StreamType: to.Ptr(armautomation.StreamTypeError), - // Summary: to.Ptr("System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Location'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.\r\n at System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics)"), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:28.903+00:00"); return t}()), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreamsByStreamId.json -func ExampleSourceControlSyncJobStreamsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSourceControlSyncJobStreamsClient().Get(ctx, "rg", "myAutomationAccount33", "MySourceControl", "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2b", "b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855139029522_00000000000000000007", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SourceControlSyncJobStreamByID = armautomation.SourceControlSyncJobStreamByID{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a2b/streams/b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855139029522_00000000000000000007"), - // Properties: &armautomation.SourceControlSyncJobStreamByIDProperties{ - // SourceControlSyncJobStreamID: to.Ptr("b86c5c31-e9fd-4734-8764-ddd6c101e706_00636596855139029522_00000000000000000007"), - // StreamText: to.Ptr("New-AzureAffinityGroup : Cannot validate argument on parameter 'Location'. The argument is null or empty. Provide an \r\nargument that is not null or empty, and then try the command again.\r\nAt DatabaseExportImport1fba401e-0:69 char:69\r\n+ \r\n + CategoryInfo : InvalidData: . . . ."), - // StreamType: to.Ptr(armautomation.StreamTypeError), - // Summary: to.Ptr(""), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:14:26.903+00:00"); return t}()), - // Value: map[string]any{ - // "Exception": map[string]any{ - // "Message": "System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Location'. The argument is null or empty . . .} }", - // }, - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/automation/armautomation/statistics_client.go b/sdk/resourcemanager/automation/armautomation/statistics_client.go index db556372b039..3473d7541bc2 100644 --- a/sdk/resourcemanager/automation/armautomation/statistics_client.go +++ b/sdk/resourcemanager/automation/armautomation/statistics_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -47,7 +46,7 @@ func NewStatisticsClient(subscriptionID string, credential azcore.TokenCredentia // NewListByAutomationAccountPager - Retrieve the statistics for the account. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - StatisticsClientListByAutomationAccountOptions contains the optional parameters for the StatisticsClient.NewListByAutomationAccountPager @@ -97,7 +96,7 @@ func (client *StatisticsClient) listByAutomationAccountCreateRequest(ctx context if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/statistics_client_example_test.go b/sdk/resourcemanager/automation/armautomation/statistics_client_example_test.go deleted file mode 100644 index 8d6f1dac1968..000000000000 --- a/sdk/resourcemanager/automation/armautomation/statistics_client_example_test.go +++ /dev/null @@ -1,137 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getStatisticsOfAutomationAccount.json -func ExampleStatisticsClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStatisticsClient().NewListByAutomationAccountPager("rg", "myAutomationAccount11", &armautomation.StatisticsClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StatisticsListResult = armautomation.StatisticsListResult{ - // Value: []*armautomation.Statistics{ - // { - // CounterProperty: to.Ptr("New"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/New"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Activating"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Activating"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Running"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Running"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Completed"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Completed"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Failed"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Failed"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Stopped"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Stopped"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Blocked"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Blocked"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Suspended"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Suspended"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Disconnected"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Disconnected"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Suspending"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Suspending"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Stopping"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Stopping"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Resuming"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Resuming"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }, - // { - // CounterProperty: to.Ptr("Removing"), - // CounterValue: to.Ptr[int64](0), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-26T02:11:49.9879197+00:00"); return t}()), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount11/statistics/Removing"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-19T02:11:49.9879197+00:00"); return t}()), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/testjob_client.go b/sdk/resourcemanager/automation/armautomation/testjob_client.go index 9892eea5de00..ef7a855335aa 100644 --- a/sdk/resourcemanager/automation/armautomation/testjob_client.go +++ b/sdk/resourcemanager/automation/armautomation/testjob_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewTestJobClient(subscriptionID string, credential azcore.TokenCredential, // Create - Create a test job of the runbook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The parameters supplied to the create test job operation. // - parameters - The parameters supplied to the create test job operation. // - options - TestJobClientCreateOptions contains the optional parameters for the TestJobClient.Create method. func (client *TestJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters, options *TestJobClientCreateOptions) (TestJobClientCreateResponse, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, parameters, options) if err != nil { return TestJobClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return TestJobClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TestJobClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -93,10 +95,13 @@ func (client *TestJobClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -111,24 +116,27 @@ func (client *TestJobClient) createHandleResponse(resp *http.Response) (TestJobC // Get - Retrieve the test job for the specified runbook. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - TestJobClientGetOptions contains the optional parameters for the TestJobClient.Get method. func (client *TestJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientGetOptions) (TestJobClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return TestJobClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -155,7 +163,7 @@ func (client *TestJobClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,22 +181,24 @@ func (client *TestJobClient) getHandleResponse(resp *http.Response) (TestJobClie // Resume - Resume the test job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - TestJobClientResumeOptions contains the optional parameters for the TestJobClient.Resume method. func (client *TestJobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientResumeOptions) (TestJobClientResumeResponse, error) { + var err error req, err := client.resumeCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return TestJobClientResumeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientResumeResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientResumeResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientResumeResponse{}, err } return TestJobClientResumeResponse{}, nil } @@ -217,7 +227,7 @@ func (client *TestJobClient) resumeCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -226,22 +236,24 @@ func (client *TestJobClient) resumeCreateRequest(ctx context.Context, resourceGr // Stop - Stop the test job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - TestJobClientStopOptions contains the optional parameters for the TestJobClient.Stop method. func (client *TestJobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientStopOptions) (TestJobClientStopResponse, error) { + var err error req, err := client.stopCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return TestJobClientStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientStopResponse{}, err } return TestJobClientStopResponse{}, nil } @@ -270,7 +282,7 @@ func (client *TestJobClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,22 +291,24 @@ func (client *TestJobClient) stopCreateRequest(ctx context.Context, resourceGrou // Suspend - Suspend the test job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - options - TestJobClientSuspendOptions contains the optional parameters for the TestJobClient.Suspend method. func (client *TestJobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, options *TestJobClientSuspendOptions) (TestJobClientSuspendResponse, error) { + var err error req, err := client.suspendCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, options) if err != nil { return TestJobClientSuspendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobClientSuspendResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobClientSuspendResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobClientSuspendResponse{}, err } return TestJobClientSuspendResponse{}, nil } @@ -323,7 +337,7 @@ func (client *TestJobClient) suspendCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/testjob_client_example_test.go b/sdk/resourcemanager/automation/armautomation/testjob_client_example_test.go deleted file mode 100644 index 5192e20d8293..000000000000 --- a/sdk/resourcemanager/automation/armautomation/testjob_client_example_test.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/createTestJob.json -func ExampleTestJobClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTestJobClient().Create(ctx, "mygroup", "ContoseAutomationAccount", "Get-AzureVMTutorial", armautomation.TestJobCreateParameters{ - Parameters: map[string]*string{ - "key01": to.Ptr("value01"), - "key02": to.Ptr("value02"), - }, - RunOn: to.Ptr(""), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getTestJob.json -func ExampleTestJobClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTestJobClient().Get(ctx, "mygroup", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TestJob = armautomation.TestJob{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T05:52:00.9344172+00:00"); return t}()), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T05:55:16.7827254+00:00"); return t}()), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T05:55:16.7827254+00:00"); return t}()), - // LastStatusModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T05:55:16.7827254+00:00"); return t}()), - // Parameters: map[string]*string{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-09T05:55:10.8344743+00:00"); return t}()), - // Status: to.Ptr("Completed"), - // StatusDetails: to.Ptr("None"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/resumeTestJob.json -func ExampleTestJobClient_Resume() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTestJobClient().Resume(ctx, "mygroup", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/stopTestJob.json -func ExampleTestJobClient_Stop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTestJobClient().Stop(ctx, "mygroup", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/suspendTestJob.json -func ExampleTestJobClient_Suspend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewTestJobClient().Suspend(ctx, "mygroup", "ContoseAutomationAccount", "Get-AzureVMTutorial", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go b/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go index 8e5d64672b3a..1155e56c0f8c 100644 --- a/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go +++ b/sdk/resourcemanager/automation/armautomation/testjobstreams_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewTestJobStreamsClient(subscriptionID string, credential azcore.TokenCrede // Get - Retrieve a test job stream of the test job identified by runbook name and stream id. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. // - jobStreamID - The job stream id. // - options - TestJobStreamsClientGetOptions contains the optional parameters for the TestJobStreamsClient.Get method. func (client *TestJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string, options *TestJobStreamsClientGetOptions) (TestJobStreamsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, runbookName, jobStreamID, options) if err != nil { return TestJobStreamsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TestJobStreamsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TestJobStreamsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TestJobStreamsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -97,7 +99,7 @@ func (client *TestJobStreamsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +116,7 @@ func (client *TestJobStreamsClient) getHandleResponse(resp *http.Response) (Test // NewListByTestJobPager - Retrieve a list of test job streams identified by runbook name. // -// Generated from API version 2018-06-30 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - runbookName - The runbook name. @@ -175,7 +177,7 @@ func (client *TestJobStreamsClient) listByTestJobCreateRequest(ctx context.Conte if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2018-06-30") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/testjobstreams_client_example_test.go b/sdk/resourcemanager/automation/armautomation/testjobstreams_client_example_test.go deleted file mode 100644 index 674cb4e023c2..000000000000 --- a/sdk/resourcemanager/automation/armautomation/testjobstreams_client_example_test.go +++ /dev/null @@ -1,93 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getTestJobStream.json -func ExampleTestJobStreamsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTestJobStreamsClient().Get(ctx, "mygroup", "ContoseAutomationAccount", "Get-AzureVMTutorial", "851b2101-686f-40e2-8a4b-5b8df08afbd1_00636535684910693884_00000000000000000001", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JobStream = armautomation.JobStream{ - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/foo/draft/testJob/streams/851b2101-686f-40e2-8a4b-5b8df08afbd1_00636535684910693884_00000000000000000001"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("851b2101-686f-40e2-8a4b-5b8df08afbd1:00636535684910693884:00000000000000000001"), - // StreamText: to.Ptr(""), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-07T02:48:11.0693884+00:00"); return t}()), - // Value: map[string]any{ - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/listTestJobStreamsByJob.json -func ExampleTestJobStreamsClient_NewListByTestJobPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTestJobStreamsClient().NewListByTestJobPager("mygroup", "ContoseAutomationAccount", "Get-AzureVMTutorial", &armautomation.TestJobStreamsClientListByTestJobOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.JobStreamListResult = armautomation.JobStreamListResult{ - // Value: []*armautomation.JobStream{ - // { - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/24456a8a-2857-4af6-932c-3455f38bd05e_00636535675981232703_00000000000000000001"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("24456a8a-2857-4af6-932c-3455f38bd05e_00636535675981232703_00000000000000000001"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-07T02:33:18.1232703+00:00"); return t}()), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourcegroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/jobName/streams/24456a8a-2857-4af6-932c-3455f38bd05e_00636535675984691350_00000000000000000002"), - // Properties: &armautomation.JobStreamProperties{ - // JobStreamID: to.Ptr("24456a8a-2857-4af6-932c-3455f38bd05e_00636535675984691350_00000000000000000002"), - // StreamType: to.Ptr(armautomation.JobStreamTypeOutput), - // Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-07T02:33:18.469135+00:00"); return t}()), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/time_rfc3339.go b/sdk/resourcemanager/automation/armautomation/time_rfc3339.go index 01abb60f48a1..2ce5151d403b 100644 --- a/sdk/resourcemanager/automation/armautomation/time_rfc3339.go +++ b/sdk/resourcemanager/automation/armautomation/time_rfc3339.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation diff --git a/sdk/resourcemanager/automation/armautomation/usages_client.go b/sdk/resourcemanager/automation/armautomation/usages_client.go index a68929d2da87..ba504f09cc62 100644 --- a/sdk/resourcemanager/automation/armautomation/usages_client.go +++ b/sdk/resourcemanager/automation/armautomation/usages_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -47,7 +46,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListByAutomationAccountPager - Retrieve the usage for the account id. // -// Generated from API version 2021-06-22 +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - UsagesClientListByAutomationAccountOptions contains the optional parameters for the UsagesClient.NewListByAutomationAccountPager @@ -94,7 +93,7 @@ func (client *UsagesClient) listByAutomationAccountCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-22") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/automation/armautomation/usages_client_example_test.go b/sdk/resourcemanager/automation/armautomation/usages_client_example_test.go deleted file mode 100644 index 44df202f04fb..000000000000 --- a/sdk/resourcemanager/automation/armautomation/usages_client_example_test.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getUsagesOfAutomationAccount.json -func ExampleUsagesClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewUsagesClient().NewListByAutomationAccountPager("rg", "myAutomationAccount11", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.UsageListResult = armautomation.UsageListResult{ - // Value: []*armautomation.Usage{ - // { - // Name: &armautomation.UsageCounterName{ - // LocalizedValue: to.Ptr("AccountUsage"), - // Value: to.Ptr("AccountUsage"), - // }, - // CurrentValue: to.Ptr[float64](0), - // Limit: to.Ptr[int64](500), - // ThrottleStatus: to.Ptr("NotThrottled"), - // Unit: to.Ptr("Minute"), - // }, - // { - // Name: &armautomation.UsageCounterName{ - // LocalizedValue: to.Ptr("SubscriptionUsage"), - // Value: to.Ptr("SubscriptionUsage"), - // }, - // CurrentValue: to.Ptr[float64](429), - // Limit: to.Ptr[int64](500), - // ThrottleStatus: to.Ptr("NotThrottled"), - // Unit: to.Ptr("Minute"), - // }, - // { - // Name: &armautomation.UsageCounterName{ - // LocalizedValue: to.Ptr("DscSubscriptionUsage"), - // Value: to.Ptr("DscSubscriptionUsage"), - // }, - // CurrentValue: to.Ptr[float64](8), - // Limit: to.Ptr[int64](5), - // ThrottleStatus: to.Ptr("ThrottledAtSubscriptionLevel"), - // Unit: to.Ptr("Count"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/variable_client.go b/sdk/resourcemanager/automation/armautomation/variable_client.go index 6b229595f2e1..8860a82d0d80 100644 --- a/sdk/resourcemanager/automation/armautomation/variable_client.go +++ b/sdk/resourcemanager/automation/armautomation/variable_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -48,25 +47,28 @@ func NewVariableClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Create a variable. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - variableName - The variable name. // - parameters - The parameters supplied to the create or update variable operation. // - options - VariableClientCreateOrUpdateOptions contains the optional parameters for the VariableClient.CreateOrUpdate method. func (client *VariableClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters, options *VariableClientCreateOrUpdateOptions) (VariableClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, variableName, parameters, options) if err != nil { return VariableClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return VariableClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VariableClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -93,10 +95,13 @@ func (client *VariableClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -111,22 +116,24 @@ func (client *VariableClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Delete the variable. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - variableName - The name of variable. // - options - VariableClientDeleteOptions contains the optional parameters for the VariableClient.Delete method. func (client *VariableClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, options *VariableClientDeleteOptions) (VariableClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, variableName, options) if err != nil { return VariableClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VariableClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VariableClientDeleteResponse{}, err } return VariableClientDeleteResponse{}, nil } @@ -155,7 +162,7 @@ func (client *VariableClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -164,24 +171,27 @@ func (client *VariableClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Retrieve the variable identified by variable name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - variableName - The name of variable. // - options - VariableClientGetOptions contains the optional parameters for the VariableClient.Get method. func (client *VariableClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, options *VariableClientGetOptions) (VariableClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, variableName, options) if err != nil { return VariableClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VariableClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VariableClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -208,7 +218,7 @@ func (client *VariableClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -225,7 +235,7 @@ func (client *VariableClient) getHandleResponse(resp *http.Response) (VariableCl // NewListByAutomationAccountPager - Retrieve a list of variables. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - options - VariableClientListByAutomationAccountOptions contains the optional parameters for the VariableClient.NewListByAutomationAccountPager @@ -278,7 +288,7 @@ func (client *VariableClient) listByAutomationAccountCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,25 +306,28 @@ func (client *VariableClient) listByAutomationAccountHandleResponse(resp *http.R // Update - Update a variable. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2020-01-13-preview +// Generated from API version 2023-11-01 // - resourceGroupName - Name of an Azure Resource group. // - automationAccountName - The name of the automation account. // - variableName - The variable name. // - parameters - The parameters supplied to the update variable operation. // - options - VariableClientUpdateOptions contains the optional parameters for the VariableClient.Update method. func (client *VariableClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters, options *VariableClientUpdateOptions) (VariableClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, variableName, parameters, options) if err != nil { return VariableClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VariableClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VariableClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VariableClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -341,10 +354,13 @@ func (client *VariableClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-01-13-preview") + reqQP.Set("api-version", "2023-11-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/variable_client_example_test.go b/sdk/resourcemanager/automation/armautomation/variable_client_example_test.go deleted file mode 100644 index 7e851068f5a5..000000000000 --- a/sdk/resourcemanager/automation/armautomation/variable_client_example_test.go +++ /dev/null @@ -1,1307 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateVariable.json -func ExampleVariableClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVariableClient().CreateOrUpdate(ctx, "rg", "sampleAccount9", "sampleVariable", armautomation.VariableCreateOrUpdateParameters{ - Name: to.Ptr("sampleVariable"), - Properties: &armautomation.VariableCreateOrUpdateProperties{ - Description: to.Ptr("my description"), - IsEncrypted: to.Ptr(false), - Value: to.Ptr("\"ComputerName.domain.com\""), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Variable = armautomation.Variable{ - // Name: to.Ptr("sampleVariable"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable"), - // Properties: &armautomation.VariableProperties{ - // Description: to.Ptr("my description"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // Value: to.Ptr("\"ComputerName2.domain.com\""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateVariable_patch.json -func ExampleVariableClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVariableClient().Update(ctx, "rg", "sampleAccount9", "sampleVariable", armautomation.VariableUpdateParameters{ - Name: to.Ptr("sampleVariable"), - Properties: &armautomation.VariableUpdateProperties{ - Value: to.Ptr("\"ComputerName3.domain.com\""), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Variable = armautomation.Variable{ - // Name: to.Ptr("sampleVariable"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable"), - // Properties: &armautomation.VariableProperties{ - // Description: to.Ptr("my description"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:53.363+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:57.987+00:00"); return t}()), - // Value: to.Ptr("\"ComputerName3.domain.com\""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteVariable.json -func ExampleVariableClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewVariableClient().Delete(ctx, "rg", "sampleAccount9", "sampleVariable", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getVariable.json -func ExampleVariableClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewVariableClient().Get(ctx, "rg", "sampleAccount9", "sampleVariable", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Variable = armautomation.Variable{ - // Name: to.Ptr("sampleVariable"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable"), - // Properties: &armautomation.VariableProperties{ - // Description: to.Ptr("my description"), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T22:59:00.937+00:00"); return t}()), - // Value: to.Ptr("\"ComputerName.domain.com\""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listVariables_First100.json -func ExampleVariableClient_NewListByAutomationAccountPager_listVariablesFirst100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewVariableClient().NewListByAutomationAccountPager("rg", "sampleAccount9", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.VariableListResult = armautomation.VariableListResult{ - // Value: []*armautomation.Variable{ - // { - // Name: to.Ptr("sampleVariable"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:53.363+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:57.987+00:00"); return t}()), - // Value: to.Ptr("\"ComputerName3.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable0"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable0"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:58.847+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:58.847+00:00"); return t}()), - // Value: to.Ptr("\"server0.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable1"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable1"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:59.69+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:00:59.69+00:00"); return t}()), - // Value: to.Ptr("\"server1.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable10"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable10"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:08.393+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:08.393+00:00"); return t}()), - // Value: to.Ptr("\"server10.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable100"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable100"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:27.38+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:27.38+00:00"); return t}()), - // Value: to.Ptr("\"server100.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable101"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable101"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:28.223+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:28.223+00:00"); return t}()), - // Value: to.Ptr("\"server101.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable102"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable102"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:28.99+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:28.99+00:00"); return t}()), - // Value: to.Ptr("\"server102.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable103"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable103"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:29.77+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:29.77+00:00"); return t}()), - // Value: to.Ptr("\"server103.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable104"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable104"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:30.647+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:30.647+00:00"); return t}()), - // Value: to.Ptr("\"server104.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable105"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable105"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:31.49+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:31.49+00:00"); return t}()), - // Value: to.Ptr("\"server105.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable106"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable106"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:32.303+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:32.303+00:00"); return t}()), - // Value: to.Ptr("\"server106.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable107"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable107"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:34.583+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:34.583+00:00"); return t}()), - // Value: to.Ptr("\"server107.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable108"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable108"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:35.367+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:35.367+00:00"); return t}()), - // Value: to.Ptr("\"server108.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable109"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable109"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:36.147+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:36.147+00:00"); return t}()), - // Value: to.Ptr("\"server109.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable11"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable11"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:09.27+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:09.27+00:00"); return t}()), - // Value: to.Ptr("\"server11.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable12"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable12"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:10.16+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:10.16+00:00"); return t}()), - // Value: to.Ptr("\"server12.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable13"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable13"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:11.003+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:11.003+00:00"); return t}()), - // Value: to.Ptr("\"server13.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable14"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable14"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:11.863+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:11.863+00:00"); return t}()), - // Value: to.Ptr("\"server14.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable15"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable15"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:12.74+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:12.74+00:00"); return t}()), - // Value: to.Ptr("\"server15.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable16"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable16"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:13.597+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:13.597+00:00"); return t}()), - // Value: to.Ptr("\"server16.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable17"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable17"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:16.287+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:16.287+00:00"); return t}()), - // Value: to.Ptr("\"server17.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable18"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable18"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:17.16+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:17.16+00:00"); return t}()), - // Value: to.Ptr("\"server18.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable19"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable19"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:18.02+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:18.02+00:00"); return t}()), - // Value: to.Ptr("\"server19.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable2"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable2"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:00.567+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:00.567+00:00"); return t}()), - // Value: to.Ptr("\"server2.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable20"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable20"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:18.847+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:18.847+00:00"); return t}()), - // Value: to.Ptr("\"server20.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable21"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable21"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:19.723+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:19.723+00:00"); return t}()), - // Value: to.Ptr("\"server21.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable22"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable22"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:21.597+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:21.597+00:00"); return t}()), - // Value: to.Ptr("\"server22.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable23"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable23"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:22.393+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:22.393+00:00"); return t}()), - // Value: to.Ptr("\"server23.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable24"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable24"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:23.207+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:23.207+00:00"); return t}()), - // Value: to.Ptr("\"server24.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable25"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable25"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:23.973+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:23.973+00:00"); return t}()), - // Value: to.Ptr("\"server25.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable26"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable26"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:24.8+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:24.8+00:00"); return t}()), - // Value: to.Ptr("\"server26.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable27"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable27"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:25.597+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:25.597+00:00"); return t}()), - // Value: to.Ptr("\"server27.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable28"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable28"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:26.55+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:26.55+00:00"); return t}()), - // Value: to.Ptr("\"server28.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable29"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable29"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:27.457+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:27.457+00:00"); return t}()), - // Value: to.Ptr("\"server29.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable3"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable3"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:01.427+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:01.427+00:00"); return t}()), - // Value: to.Ptr("\"server3.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable30"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable30"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:28.253+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:28.253+00:00"); return t}()), - // Value: to.Ptr("\"server30.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable31"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable31"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:29.05+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:29.05+00:00"); return t}()), - // Value: to.Ptr("\"server31.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable32"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable32"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:29.817+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:29.817+00:00"); return t}()), - // Value: to.Ptr("\"server32.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable33"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable33"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:30.643+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:30.643+00:00"); return t}()), - // Value: to.Ptr("\"server33.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable34"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable34"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:31.473+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:31.473+00:00"); return t}()), - // Value: to.Ptr("\"server34.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable35"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable35"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:32.253+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:32.253+00:00"); return t}()), - // Value: to.Ptr("\"server35.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable36"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable36"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:33.27+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:33.27+00:00"); return t}()), - // Value: to.Ptr("\"server36.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable37"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable37"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:34.037+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:34.037+00:00"); return t}()), - // Value: to.Ptr("\"server37.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable38"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable38"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:34.817+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:34.817+00:00"); return t}()), - // Value: to.Ptr("\"server38.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable39"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable39"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:35.613+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:35.613+00:00"); return t}()), - // Value: to.Ptr("\"server39.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable4"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable4"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:02.38+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:02.38+00:00"); return t}()), - // Value: to.Ptr("\"server4.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable40"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable40"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:36.397+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:36.397+00:00"); return t}()), - // Value: to.Ptr("\"server40.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable41"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable41"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:37.19+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:37.19+00:00"); return t}()), - // Value: to.Ptr("\"server41.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable42"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable42"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:38.037+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:38.037+00:00"); return t}()), - // Value: to.Ptr("\"server42.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable43"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable43"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:38.88+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:38.88+00:00"); return t}()), - // Value: to.Ptr("\"server43.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable44"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable44"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:39.707+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:39.707+00:00"); return t}()), - // Value: to.Ptr("\"server44.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable45"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable45"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:41.457+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:41.457+00:00"); return t}()), - // Value: to.Ptr("\"server45.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable46"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable46"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:42.253+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:42.253+00:00"); return t}()), - // Value: to.Ptr("\"server46.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable47"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable47"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:43.083+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:43.083+00:00"); return t}()), - // Value: to.Ptr("\"server47.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable48"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable48"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:43.957+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:43.957+00:00"); return t}()), - // Value: to.Ptr("\"server48.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable49"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable49"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:44.74+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:44.74+00:00"); return t}()), - // Value: to.Ptr("\"server49.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable5"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable5"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:03.253+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:03.253+00:00"); return t}()), - // Value: to.Ptr("\"server5.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable50"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable50"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:46.35+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:46.35+00:00"); return t}()), - // Value: to.Ptr("\"server50.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable51"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable51"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:47.1+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:47.1+00:00"); return t}()), - // Value: to.Ptr("\"server51.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable52"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable52"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:47.88+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:47.88+00:00"); return t}()), - // Value: to.Ptr("\"server52.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable53"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable53"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:48.677+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:48.677+00:00"); return t}()), - // Value: to.Ptr("\"server53.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable54"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable54"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:49.473+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:49.473+00:00"); return t}()), - // Value: to.Ptr("\"server54.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable55"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable55"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:51.16+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:51.16+00:00"); return t}()), - // Value: to.Ptr("\"server55.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable56"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable56"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:51.927+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:51.927+00:00"); return t}()), - // Value: to.Ptr("\"server56.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable57"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable57"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:52.757+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:52.757+00:00"); return t}()), - // Value: to.Ptr("\"server57.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable58"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable58"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:53.55+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:53.55+00:00"); return t}()), - // Value: to.Ptr("\"server58.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable59"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable59"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:54.317+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:54.317+00:00"); return t}()), - // Value: to.Ptr("\"server59.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable6"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable6"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:04.143+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:04.143+00:00"); return t}()), - // Value: to.Ptr("\"server6.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable60"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable60"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:55.177+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:55.177+00:00"); return t}()), - // Value: to.Ptr("\"server60.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable61"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable61"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:56.583+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:56.583+00:00"); return t}()), - // Value: to.Ptr("\"server61.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable62"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable62"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:57.27+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:57.27+00:00"); return t}()), - // Value: to.Ptr("\"server62.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable63"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable63"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:57.943+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:57.943+00:00"); return t}()), - // Value: to.Ptr("\"server63.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable64"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable64"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:58.66+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:58.66+00:00"); return t}()), - // Value: to.Ptr("\"server64.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable65"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable65"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:59.35+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:59.35+00:00"); return t}()), - // Value: to.Ptr("\"server65.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable66"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable66"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:00.02+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:00.02+00:00"); return t}()), - // Value: to.Ptr("\"server66.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable67"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable67"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:01.507+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:01.507+00:00"); return t}()), - // Value: to.Ptr("\"server67.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable68"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable68"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:02.177+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:02.177+00:00"); return t}()), - // Value: to.Ptr("\"server68.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable69"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable69"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:02.863+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:02.863+00:00"); return t}()), - // Value: to.Ptr("\"server69.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable7"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable7"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:05.393+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:05.393+00:00"); return t}()), - // Value: to.Ptr("\"server7.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable70"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable70"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:03.6+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:03.6+00:00"); return t}()), - // Value: to.Ptr("\"server70.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable71"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable71"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:04.333+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:04.333+00:00"); return t}()), - // Value: to.Ptr("\"server71.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable72"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable72"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:05.1+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:05.1+00:00"); return t}()), - // Value: to.Ptr("\"server72.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable73"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable73"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:05.833+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:05.833+00:00"); return t}()), - // Value: to.Ptr("\"server73.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable74"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable74"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:06.647+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:06.647+00:00"); return t}()), - // Value: to.Ptr("\"server74.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable75"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable75"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:07.363+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:07.363+00:00"); return t}()), - // Value: to.Ptr("\"server75.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable76"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable76"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:08.1+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:08.1+00:00"); return t}()), - // Value: to.Ptr("\"server76.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable77"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable77"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:08.82+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:08.82+00:00"); return t}()), - // Value: to.Ptr("\"server77.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable78"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable78"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:09.553+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:09.553+00:00"); return t}()), - // Value: to.Ptr("\"server78.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable79"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable79"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:10.63+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:10.63+00:00"); return t}()), - // Value: to.Ptr("\"server79.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable8"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable8"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:06.52+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:06.52+00:00"); return t}()), - // Value: to.Ptr("\"server8.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable80"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable80"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:11.32+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:11.32+00:00"); return t}()), - // Value: to.Ptr("\"server80.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable81"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable81"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:12.02+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:12.02+00:00"); return t}()), - // Value: to.Ptr("\"server81.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable82"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable82"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:12.723+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:12.723+00:00"); return t}()), - // Value: to.Ptr("\"server82.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable83"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable83"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:13.443+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:13.443+00:00"); return t}()), - // Value: to.Ptr("\"server83.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable84"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable84"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:14.16+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:14.16+00:00"); return t}()), - // Value: to.Ptr("\"server84.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable85"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable85"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:15.177+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:15.177+00:00"); return t}()), - // Value: to.Ptr("\"server85.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable86"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable86"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:16.053+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:16.053+00:00"); return t}()), - // Value: to.Ptr("\"server86.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable87"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable87"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:16.82+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:16.82+00:00"); return t}()), - // Value: to.Ptr("\"server87.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable88"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable88"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:17.583+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:17.583+00:00"); return t}()), - // Value: to.Ptr("\"server88.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable89"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable89"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:18.333+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:18.333+00:00"); return t}()), - // Value: to.Ptr("\"server89.domain.com\""), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listVariables_Next100.json -func ExampleVariableClient_NewListByAutomationAccountPager_listVariablesNext100() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewVariableClient().NewListByAutomationAccountPager("rg", "sampleAccount9", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.VariableListResult = armautomation.VariableListResult{ - // Value: []*armautomation.Variable{ - // { - // Name: to.Ptr("sampleVariable9"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable9"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:07.38+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:01:07.38+00:00"); return t}()), - // Value: to.Ptr("\"server9.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable90"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable90"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:19.147+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:19.147+00:00"); return t}()), - // Value: to.Ptr("\"server90.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable91"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable91"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:20.257+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:20.257+00:00"); return t}()), - // Value: to.Ptr("\"server91.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable92"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable92"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:21.037+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:21.037+00:00"); return t}()), - // Value: to.Ptr("\"server92.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable93"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable93"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:21.803+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:21.803+00:00"); return t}()), - // Value: to.Ptr("\"server93.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable94"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable94"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:22.583+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:22.583+00:00"); return t}()), - // Value: to.Ptr("\"server94.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable95"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable95"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:23.333+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:23.333+00:00"); return t}()), - // Value: to.Ptr("\"server95.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable96"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable96"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:24.163+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:24.163+00:00"); return t}()), - // Value: to.Ptr("\"server96.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable97"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable97"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:24.973+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:24.973+00:00"); return t}()), - // Value: to.Ptr("\"server97.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable98"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable98"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:25.757+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:25.757+00:00"); return t}()), - // Value: to.Ptr("\"server98.domain.com\""), - // }, - // }, - // { - // Name: to.Ptr("sampleVariable99"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/variables/sampleVariable99"), - // Properties: &armautomation.VariableProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:26.553+00:00"); return t}()), - // IsEncrypted: to.Ptr(false), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-28T23:02:26.553+00:00"); return t}()), - // Value: to.Ptr("\"server99.domain.com\""), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/watcher_client.go b/sdk/resourcemanager/automation/armautomation/watcher_client.go index eae28646dfb0..6e401d76edd3 100644 --- a/sdk/resourcemanager/automation/armautomation/watcher_client.go +++ b/sdk/resourcemanager/automation/armautomation/watcher_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -55,18 +54,21 @@ func NewWatcherClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The create or update parameters for watcher. // - options - WatcherClientCreateOrUpdateOptions contains the optional parameters for the WatcherClient.CreateOrUpdate method. func (client *WatcherClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, parameters Watcher, options *WatcherClientCreateOrUpdateOptions) (WatcherClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, parameters, options) if err != nil { return WatcherClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WatcherClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WatcherClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +98,10 @@ func (client *WatcherClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +122,18 @@ func (client *WatcherClient) createOrUpdateHandleResponse(resp *http.Response) ( // - watcherName - The watcher name. // - options - WatcherClientDeleteOptions contains the optional parameters for the WatcherClient.Delete method. func (client *WatcherClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientDeleteOptions) (WatcherClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, options) if err != nil { return WatcherClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientDeleteResponse{}, err } return WatcherClientDeleteResponse{}, nil } @@ -170,18 +177,21 @@ func (client *WatcherClient) deleteCreateRequest(ctx context.Context, resourceGr // - watcherName - The watcher name. // - options - WatcherClientGetOptions contains the optional parameters for the WatcherClient.Get method. func (client *WatcherClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientGetOptions) (WatcherClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, options) if err != nil { return WatcherClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -305,16 +315,18 @@ func (client *WatcherClient) listByAutomationAccountHandleResponse(resp *http.Re // - watcherName - The watcher name. // - options - WatcherClientStartOptions contains the optional parameters for the WatcherClient.Start method. func (client *WatcherClient) Start(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientStartOptions) (WatcherClientStartResponse, error) { + var err error req, err := client.startCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, options) if err != nil { return WatcherClientStartResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientStartResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientStartResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientStartResponse{}, err } return WatcherClientStartResponse{}, nil } @@ -358,16 +370,18 @@ func (client *WatcherClient) startCreateRequest(ctx context.Context, resourceGro // - watcherName - The watcher name. // - options - WatcherClientStopOptions contains the optional parameters for the WatcherClient.Stop method. func (client *WatcherClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, options *WatcherClientStopOptions) (WatcherClientStopResponse, error) { + var err error req, err := client.stopCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, options) if err != nil { return WatcherClientStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientStopResponse{}, err } return WatcherClientStopResponse{}, nil } @@ -412,18 +426,21 @@ func (client *WatcherClient) stopCreateRequest(ctx context.Context, resourceGrou // - parameters - The update parameters for watcher. // - options - WatcherClientUpdateOptions contains the optional parameters for the WatcherClient.Update method. func (client *WatcherClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, watcherName string, parameters WatcherUpdateParameters, options *WatcherClientUpdateOptions) (WatcherClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, watcherName, parameters, options) if err != nil { return WatcherClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WatcherClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatcherClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatcherClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -453,7 +470,10 @@ func (client *WatcherClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2020-01-13-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/watcher_client_example_test.go b/sdk/resourcemanager/automation/armautomation/watcher_client_example_test.go deleted file mode 100644 index 2c33e8a65191..000000000000 --- a/sdk/resourcemanager/automation/armautomation/watcher_client_example_test.go +++ /dev/null @@ -1,256 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -import ( - "context" - "log" - - "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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateWatcher.json -func ExampleWatcherClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWatcherClient().CreateOrUpdate(ctx, "rg", "MyTestAutomationAccount", "MyTestWatcher", armautomation.Watcher{ - Properties: &armautomation.WatcherProperties{ - Description: to.Ptr("This is a test watcher."), - ExecutionFrequencyInSeconds: to.Ptr[int64](60), - ScriptName: to.Ptr("MyTestWatcherRunbook"), - ScriptRunOn: to.Ptr("MyTestHybridWorkerGroup"), - }, - Tags: map[string]*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Watcher = armautomation.Watcher{ - // Name: to.Ptr("MyTestWatcher"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher"), - // Properties: &armautomation.WatcherProperties{ - // Description: to.Ptr("This is a test watcher."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-14T21:14:09.607+00:00"); return t}()), - // ExecutionFrequencyInSeconds: to.Ptr[int64](60), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-14T21:14:09.607+00:00"); return t}()), - // ScriptName: to.Ptr("MyTestWatcherRunbook"), - // ScriptRunOn: to.Ptr("MyTestHybridWorkerGroup"), - // Status: to.Ptr("New"), - // }, - // Tags: map[string]*string{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getWatcher.json -func ExampleWatcherClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWatcherClient().Get(ctx, "rg", "MyTestAutomationAccount", "MyTestWatcher", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Watcher = armautomation.Watcher{ - // Name: to.Ptr("MyTestWatcher"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher"), - // Properties: &armautomation.WatcherProperties{ - // Description: to.Ptr(""), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-30T18:50:17.163+00:00"); return t}()), - // ExecutionFrequencyInSeconds: to.Ptr[int64](60), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-30T18:50:17.163+00:00"); return t}()), - // ScriptName: to.Ptr("MyTestWatcherRunbook"), - // ScriptParameters: map[string]*string{ - // }, - // ScriptRunOn: to.Ptr("MyTestHybridWorkerGroup"), - // Status: to.Ptr("Running"), - // }, - // Tags: map[string]*string{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateWatcher.json -func ExampleWatcherClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWatcherClient().Update(ctx, "rg", "MyTestAutomationAccount", "MyTestWatcher", armautomation.WatcherUpdateParameters{ - Name: to.Ptr("MyTestWatcher"), - Properties: &armautomation.WatcherUpdateProperties{ - ExecutionFrequencyInSeconds: to.Ptr[int64](600), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Watcher = armautomation.Watcher{ - // Name: to.Ptr("MyTestWatcher"), - // ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher"), - // Properties: &armautomation.WatcherProperties{ - // Description: to.Ptr("This is a test watcher."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-14T21:33:02.197+00:00"); return t}()), - // ExecutionFrequencyInSeconds: to.Ptr[int64](600), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-14T22:29:57.65+00:00"); return t}()), - // ScriptName: to.Ptr("MyTestWatcherRunbook"), - // ScriptParameters: map[string]*string{ - // }, - // ScriptRunOn: to.Ptr("MyTestHybridWorkerGroup"), - // Status: to.Ptr("New"), - // }, - // Tags: map[string]*string{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteWatcher.json -func ExampleWatcherClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWatcherClient().Delete(ctx, "rg", "MyTestAutomationAccount", "MyTestWatcher", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/startWatcher.json -func ExampleWatcherClient_Start() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWatcherClient().Start(ctx, "rg", "MyTestAutomationAccount", "MyTestWatcher", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/stopWatcher.json -func ExampleWatcherClient_Stop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWatcherClient().Stop(ctx, "rg", "MyTestAutomationAccount", "MyTestWatcher", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listWatchersByAutomationAccount.json -func ExampleWatcherClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWatcherClient().NewListByAutomationAccountPager("rg", "MyTestAutomationAccount", &armautomation.WatcherClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WatcherListResult = armautomation.WatcherListResult{ - // Value: []*armautomation.Watcher{ - // { - // Name: to.Ptr("MyTestWatcher"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher"), - // Properties: &armautomation.WatcherProperties{ - // Description: to.Ptr("This is a test watcher."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-20T21:36:48.597+00:00"); return t}()), - // ExecutionFrequencyInSeconds: to.Ptr[int64](60), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-20T21:36:48.597+00:00"); return t}()), - // ScriptName: to.Ptr("MyTestWatcher"), - // ScriptRunOn: to.Ptr("MyTestHybridWorkerGroup"), - // }, - // }, - // { - // Name: to.Ptr("MyTestWatcher01"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher01"), - // Properties: &armautomation.WatcherProperties{ - // Description: to.Ptr("This is a test watcher."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-20T20:47:24.697+00:00"); return t}()), - // ExecutionFrequencyInSeconds: to.Ptr[int64](60), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-20T20:47:24.697+00:00"); return t}()), - // ScriptName: to.Ptr("MyTestWatcher"), - // ScriptRunOn: to.Ptr("MyTestHybridWorkerGroup"), - // }, - // }, - // { - // Name: to.Ptr("MyTestWatcher02"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/MyTestAutomationAccount/watchers/MyTestWatcher02"), - // Properties: &armautomation.WatcherProperties{ - // Description: to.Ptr("This is a test watcher."), - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-20T21:26:35.647+00:00"); return t}()), - // ExecutionFrequencyInSeconds: to.Ptr[int64](60), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-12-20T21:26:35.647+00:00"); return t}()), - // ScriptName: to.Ptr("MyTestWatcher"), - // ScriptRunOn: to.Ptr("MyTestHybridWorkerGroup"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/automation/armautomation/webhook_client.go b/sdk/resourcemanager/automation/armautomation/webhook_client.go index dfc84571bc53..765e8445b4be 100644 --- a/sdk/resourcemanager/automation/armautomation/webhook_client.go +++ b/sdk/resourcemanager/automation/armautomation/webhook_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armautomation @@ -55,18 +54,21 @@ func NewWebhookClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - The create or update parameters for webhook. // - options - WebhookClientCreateOrUpdateOptions contains the optional parameters for the WebhookClient.CreateOrUpdate method. func (client *WebhookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters, options *WebhookClientCreateOrUpdateOptions) (WebhookClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, automationAccountName, webhookName, parameters, options) if err != nil { return WebhookClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebhookClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebhookClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -96,7 +98,10 @@ func (client *WebhookClient) createOrUpdateCreateRequest(ctx context.Context, re reqQP.Set("api-version", "2015-10-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -117,16 +122,18 @@ func (client *WebhookClient) createOrUpdateHandleResponse(resp *http.Response) ( // - webhookName - The webhook name. // - options - WebhookClientDeleteOptions contains the optional parameters for the WebhookClient.Delete method. func (client *WebhookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, options *WebhookClientDeleteOptions) (WebhookClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, automationAccountName, webhookName, options) if err != nil { return WebhookClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientDeleteResponse{}, err } return WebhookClientDeleteResponse{}, nil } @@ -169,18 +176,21 @@ func (client *WebhookClient) deleteCreateRequest(ctx context.Context, resourceGr // - automationAccountName - The name of the automation account. // - options - WebhookClientGenerateURIOptions contains the optional parameters for the WebhookClient.GenerateURI method. func (client *WebhookClient) GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string, options *WebhookClientGenerateURIOptions) (WebhookClientGenerateURIResponse, error) { + var err error req, err := client.generateURICreateRequest(ctx, resourceGroupName, automationAccountName, options) if err != nil { return WebhookClientGenerateURIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientGenerateURIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientGenerateURIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientGenerateURIResponse{}, err } - return client.generateURIHandleResponse(resp) + resp, err := client.generateURIHandleResponse(httpResp) + return resp, err } // generateURICreateRequest creates the GenerateURI request. @@ -227,18 +237,21 @@ func (client *WebhookClient) generateURIHandleResponse(resp *http.Response) (Web // - webhookName - The webhook name. // - options - WebhookClientGetOptions contains the optional parameters for the WebhookClient.Get method. func (client *WebhookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, options *WebhookClientGetOptions) (WebhookClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, automationAccountName, webhookName, options) if err != nil { return WebhookClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -363,18 +376,21 @@ func (client *WebhookClient) listByAutomationAccountHandleResponse(resp *http.Re // - parameters - The update parameters for webhook. // - options - WebhookClientUpdateOptions contains the optional parameters for the WebhookClient.Update method. func (client *WebhookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters, options *WebhookClientUpdateOptions) (WebhookClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, automationAccountName, webhookName, parameters, options) if err != nil { return WebhookClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebhookClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebhookClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebhookClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -404,7 +420,10 @@ func (client *WebhookClient) updateCreateRequest(ctx context.Context, resourceGr reqQP.Set("api-version", "2015-10-31") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/automation/armautomation/webhook_client_example_test.go b/sdk/resourcemanager/automation/armautomation/webhook_client_example_test.go deleted file mode 100644 index 83e9ce92328a..000000000000 --- a/sdk/resourcemanager/automation/armautomation/webhook_client_example_test.go +++ /dev/null @@ -1,223 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armautomation_test - -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/automation/armautomation" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/webhookGenerateUri.json -func ExampleWebhookClient_GenerateURI() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebhookClient().GenerateURI(ctx, "rg", "myAutomationAccount33", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Value = "" -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/deleteWebhook.json -func ExampleWebhookClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebhookClient().Delete(ctx, "rg", "myAutomationAccount33", "TestWebhook", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/getWebhook.json -func ExampleWebhookClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebhookClient().Get(ctx, "rg", "myAutomationAccount33", "TestWebhook", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Webhook = armautomation.Webhook{ - // Name: to.Ptr("TestWebhook"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/webhooks/TestWebhook"), - // Properties: &armautomation.WebhookProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T22:18:14.6651862+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T22:18:13.7002872+00:00"); return t}()), - // IsEnabled: to.Ptr(true), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T22:18:14.6651862+00:00"); return t}()), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // URI: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/createOrUpdateWebhook.json -func ExampleWebhookClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebhookClient().CreateOrUpdate(ctx, "rg", "myAutomationAccount33", "TestWebhook", armautomation.WebhookCreateOrUpdateParameters{ - Name: to.Ptr("TestWebhook"), - Properties: &armautomation.WebhookCreateOrUpdateProperties{ - ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T22:18:13.7002872Z"); return t }()), - IsEnabled: to.Ptr(true), - Runbook: &armautomation.RunbookAssociationProperty{ - Name: to.Ptr("TestRunbook"), - }, - URI: to.Ptr(""), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Webhook = armautomation.Webhook{ - // Name: to.Ptr("TestWebhook"), - // Type: to.Ptr("Microsoft.Automation/AutomationAccounts/Webhooks"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/webhooks/TestWebhook"), - // Properties: &armautomation.WebhookProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T22:18:14.6651862+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T22:18:13.7002872+00:00"); return t}()), - // IsEnabled: to.Ptr(true), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T22:18:14.6651862+00:00"); return t}()), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // URI: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/updateWebhook.json -func ExampleWebhookClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebhookClient().Update(ctx, "rg", "myAutomationAccount33", "TestWebhook", armautomation.WebhookUpdateParameters{ - Name: to.Ptr("TestWebhook"), - Properties: &armautomation.WebhookUpdateProperties{ - Description: to.Ptr("updated webhook"), - IsEnabled: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Webhook = armautomation.Webhook{ - // Name: to.Ptr("TestWebhook"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/webhooks/TestWebhook"), - // Properties: &armautomation.WebhookProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T21:52:01.272378+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-30T23:03:14.5752078+00:00"); return t}()), - // IsEnabled: to.Ptr(false), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-30T23:03:14.9069441+00:00"); return t}()), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // URI: to.Ptr(""), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/listWebhooksByAutomationAccount.json -func ExampleWebhookClient_NewListByAutomationAccountPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armautomation.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebhookClient().NewListByAutomationAccountPager("rg", "myAutomationAccount33", &armautomation.WebhookClientListByAutomationAccountOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebhookListResult = armautomation.WebhookListResult{ - // Value: []*armautomation.Webhook{ - // { - // Name: to.Ptr("TestWebhook"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/webhooks/TestWebhook"), - // Properties: &armautomation.WebhookProperties{ - // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T22:18:14.6651862+00:00"); return t}()), - // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-29T22:18:13.7002872+00:00"); return t}()), - // IsEnabled: to.Ptr(true), - // LastModifiedBy: to.Ptr(""), - // LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-29T22:18:14.6651862+00:00"); return t}()), - // Runbook: &armautomation.RunbookAssociationProperty{ - // Name: to.Ptr("TestRunbook"), - // }, - // }, - // }}, - // } - } -}