From 6345ffdc76fc320e863ca63158348f732e25d0b8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 9 Aug 2023 03:39:41 +0000 Subject: [PATCH] CodeGen from PR 25219 in Azure/azure-rest-api-specs Merge 0a6d8fa2d06e786f86d8e138f0f3413fe522ec99 into 2735b620aeb695c106fecd9bf28d719aa0b75b43 --- .../armdomainservices/CHANGELOG.md | 10 + .../armdomainservices/autorest.md | 6 +- .../armdomainservices/client.go | 93 +-- .../armdomainservices/client_example_test.go | 540 ------------------ .../armdomainservices/client_factory.go | 17 +- .../armdomainservices/constants.go | 53 +- .../domainserviceoperations_client.go | 7 +- ...inserviceoperations_client_example_test.go | 96 ---- .../domainservices/armdomainservices/go.mod | 20 +- .../domainservices/armdomainservices/go.sum | 38 +- .../armdomainservices/models.go | 340 +++++------ .../armdomainservices/models_serde.go | 19 +- .../armdomainservices/options.go | 82 +++ .../armdomainservices/oucontainer_client.go | 89 +-- .../oucontainer_client_example_test.go | 254 -------- .../oucontaineroperations_client.go | 7 +- ...containeroperations_client_example_test.go | 96 ---- .../armdomainservices/response_types.go | 14 +- .../armdomainservices/time_rfc1123.go | 3 +- .../armdomainservices/time_rfc3339.go | 3 +- 20 files changed, 454 insertions(+), 1333 deletions(-) delete mode 100644 sdk/resourcemanager/domainservices/armdomainservices/client_example_test.go delete mode 100644 sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client_example_test.go create mode 100644 sdk/resourcemanager/domainservices/armdomainservices/options.go delete mode 100644 sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client_example_test.go delete mode 100644 sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client_example_test.go diff --git a/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md b/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md index 49fc56c1f46f..a0c802c517b8 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md +++ b/sdk/resourcemanager/domainservices/armdomainservices/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.2.0 (2023-08-09) +### Features Added + +- New enum type `ChannelBinding` with values `ChannelBindingDisabled`, `ChannelBindingEnabled` +- New enum type `LdapSigning` with values `LdapSigningDisabled`, `LdapSigningEnabled` +- New enum type `SyncScope` with values `SyncScopeAll`, `SyncScopeCloudOnly` +- New field `ChannelBinding`, `LdapSigning` in struct `DomainSecuritySettings` +- New field `SyncApplicationID`, `SyncScope` in struct `DomainServiceProperties` + + ## 1.1.0 (2023-03-28) ### Features Added diff --git a/sdk/resourcemanager/domainservices/armdomainservices/autorest.md b/sdk/resourcemanager/domainservices/armdomainservices/autorest.md index 7914251ed611..fc59d352fa3c 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/autorest.md +++ b/sdk/resourcemanager/domainservices/armdomainservices/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/domainservices/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/domainservices/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 +module-version: 1.2.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/domainservices/armdomainservices/client.go b/sdk/resourcemanager/domainservices/armdomainservices/client.go index c82b19410e66..bb508984bc69 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/client.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/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 armdomainservices @@ -50,7 +49,7 @@ func NewClient(subscriptionID string, credential azcore.TokenCredential, options // properties will remain unchanged. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - domainService - Properties supplied to the Create or Update a Domain Service operation. @@ -61,7 +60,8 @@ func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -72,20 +72,22 @@ func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName // properties will remain unchanged. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 func (client *Client) createOrUpdate(ctx context.Context, resourceGroupName string, domainServiceName string, domainService DomainService, options *ClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, domainServiceName, domainService, 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, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -108,16 +110,19 @@ func (client *Client) createOrUpdateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainService) + if err := runtime.MarshalAsJSON(req, domainService); err != nil { + return nil, err + } + return req, nil } // BeginDelete - The Delete Domain Service operation deletes an existing Domain Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. @@ -127,7 +132,8 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -136,20 +142,22 @@ func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, // Delete - The Delete Domain Service operation deletes an existing Domain Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 func (client *Client) deleteOperation(ctx context.Context, resourceGroupName string, domainServiceName string, options *ClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, domainServiceName, 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. @@ -172,7 +180,7 @@ func (client *Client) deleteCreateRequest(ctx context.Context, resourceGroupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,23 +189,26 @@ func (client *Client) deleteCreateRequest(ctx context.Context, resourceGroupName // Get - The Get Domain Service operation retrieves a json representation of the Domain Service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - options - ClientGetOptions contains the optional parameters for the Client.Get method. func (client *Client) Get(ctx context.Context, resourceGroupName string, domainServiceName string, options *ClientGetOptions) (ClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, domainServiceName, options) if err != nil { return ClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -220,7 +231,7 @@ func (client *Client) getCreateRequest(ctx context.Context, resourceGroupName st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,7 +249,7 @@ func (client *Client) getHandleResponse(resp *http.Response) (ClientGetResponse, // NewListPager - The List Domain Services in Subscription operation lists all the domain services available under the given // subscription (and across all resource groups within that subscription). // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - options - ClientListOptions contains the optional parameters for the Client.NewListPager method. func (client *Client) NewListPager(options *ClientListOptions) *runtime.Pager[ClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ClientListResponse]{ @@ -280,7 +291,7 @@ func (client *Client) listCreateRequest(ctx context.Context, options *ClientList return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,7 +309,7 @@ func (client *Client) listHandleResponse(resp *http.Response) (ClientListRespons // NewListByResourceGroupPager - The List Domain Services in Resource Group operation lists all the domain services available // under the given resource group. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - options - ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager // method. @@ -346,7 +357,7 @@ func (client *Client) listByResourceGroupCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -365,7 +376,7 @@ func (client *Client) listByResourceGroupHandleResponse(resp *http.Response) (Cl // the properties listed in the PATCH body. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - domainService - Properties supplied to the Update a Domain Service operation. @@ -376,7 +387,8 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, if err != nil { return nil, err } - return runtime.NewPoller[ClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -386,20 +398,22 @@ func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, // the properties listed in the PATCH body. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 func (client *Client) update(ctx context.Context, resourceGroupName string, domainServiceName string, domainService DomainService, options *ClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, domainServiceName, domainService, 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 } // updateCreateRequest creates the Update request. @@ -422,8 +436,11 @@ func (client *Client) updateCreateRequest(ctx context.Context, resourceGroupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainService) + if err := runtime.MarshalAsJSON(req, domainService); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/domainservices/armdomainservices/client_example_test.go b/sdk/resourcemanager/domainservices/armdomainservices/client_example_test.go deleted file mode 100644 index 5e522d53ceb5..000000000000 --- a/sdk/resourcemanager/domainservices/armdomainservices/client_example_test.go +++ /dev/null @@ -1,540 +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 armdomainservices_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/domainservices/armdomainservices" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/ListDomainServicesBySubscription.json -func ExampleClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().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.DomainServiceListResult = armdomainservices.DomainServiceListResult{ - // Value: []*armdomainservices.DomainService{ - // { - // Name: to.Ptr("TestDomainService.com"), - // Type: to.Ptr("Microsoft.AAD/DomainServices"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestResourceGroup/providers/Microsoft.AAD/DomainServices/TestDomainService.com"), - // Properties: &armdomainservices.DomainServiceProperties{ - // DeploymentID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // DomainName: to.Ptr("TestDomainService.com"), - // DomainSecuritySettings: &armdomainservices.DomainSecuritySettings{ - // NtlmV1: to.Ptr(armdomainservices.NtlmV1Enabled), - // SyncNtlmPasswords: to.Ptr(armdomainservices.SyncNtlmPasswordsEnabled), - // TLSV1: to.Ptr(armdomainservices.TLSV1Disabled), - // }, - // FilteredSync: to.Ptr(armdomainservices.FilteredSyncEnabled), - // LdapsSettings: &armdomainservices.LdapsSettings{ - // CertificateNotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-15T21:43:21Z"); return t}()), - // CertificateThumbprint: to.Ptr("9154A390F0C387D679E0DD040701745CDFED67F3"), - // ExternalAccess: to.Ptr(armdomainservices.ExternalAccessEnabled), - // Ldaps: to.Ptr(armdomainservices.LdapsEnabled), - // PublicCertificate: to.Ptr("MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..."), - // }, - // NotificationSettings: &armdomainservices.NotificationSettings{ - // AdditionalRecipients: []*string{ - // to.Ptr("jicha@microsoft.com"), - // to.Ptr("caalmont@microsoft.com")}, - // NotifyDcAdmins: to.Ptr(armdomainservices.NotifyDcAdminsEnabled), - // NotifyGlobalAdmins: to.Ptr(armdomainservices.NotifyGlobalAdminsEnabled), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // ReplicaSets: []*armdomainservices.ReplicaSet{ - // { - // DomainControllerIPAddress: []*string{ - // to.Ptr("10.0.0.1"), - // to.Ptr("10.0.0.2")}, - // ExternalAccessIPAddress: to.Ptr("13.64.148.151"), - // HealthAlerts: []*armdomainservices.HealthAlert{ - // { - // Name: to.Ptr("The managed domain is experiencing a network error"), - // ID: to.Ptr("AADDS104"), - // Issue: to.Ptr("Microsoft is unable to reach the domain controllers for this managed domain. This may happen if a network security group (NSG) configured on your virtual network blocks access to the managed domain. Another possible reason is if there is a user defined route that blocks incoming traffic from the internet."), - // LastDetected: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-18T17:46:39.2697888Z"); return t}()), - // Raised: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-18T01:55:40.7834289Z"); return t}()), - // ResolutionURI: to.Ptr("https://aka.ms/aadds-neterr"), - // Severity: to.Ptr("2"), - // }}, - // HealthLastEvaluated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2018-02-15T21:43:21Z"); return t}()), - // HealthMonitors: []*armdomainservices.HealthMonitor{ - // { - // Name: to.Ptr("Backup"), - // ID: to.Ptr("AADDS501"), - // Details: to.Ptr("Last backed up on Tue, 18 Sep 2018 03:37:04 GMT"), - // }, - // { - // Name: to.Ptr("Synchronization with Azure AD"), - // ID: to.Ptr("AADDS500"), - // Details: to.Ptr("Synchronized on Tue, 18 Sep 2018 16:47:57 GMT."), - // }}, - // Location: to.Ptr("West US"), - // ReplicaSetID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // ServiceStatus: to.Ptr("Running"), - // SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS"), - // VnetSiteID: to.Ptr("99083198-a39c-469f-972d-59017e7f078c"), - // }}, - // SyncOwner: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // Version: to.Ptr[int32](2), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/ListDomainServicesByResourceGroup.json -func ExampleClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().NewListByResourceGroupPager("TestResourceGroup", 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.DomainServiceListResult = armdomainservices.DomainServiceListResult{ - // Value: []*armdomainservices.DomainService{ - // { - // Name: to.Ptr("TestDomainService.com"), - // Type: to.Ptr("Microsoft.AAD/DomainServices"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestResourceGroup/providers/Microsoft.AAD/DomainServices/TestDomainService.com"), - // Properties: &armdomainservices.DomainServiceProperties{ - // DeploymentID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // DomainName: to.Ptr("TestDomainService.com"), - // DomainSecuritySettings: &armdomainservices.DomainSecuritySettings{ - // NtlmV1: to.Ptr(armdomainservices.NtlmV1Enabled), - // SyncNtlmPasswords: to.Ptr(armdomainservices.SyncNtlmPasswordsEnabled), - // TLSV1: to.Ptr(armdomainservices.TLSV1Disabled), - // }, - // FilteredSync: to.Ptr(armdomainservices.FilteredSyncEnabled), - // LdapsSettings: &armdomainservices.LdapsSettings{ - // CertificateNotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-15T21:43:21Z"); return t}()), - // CertificateThumbprint: to.Ptr("9154A390F0C387D679E0DD040701745CDFED67F3"), - // ExternalAccess: to.Ptr(armdomainservices.ExternalAccessEnabled), - // Ldaps: to.Ptr(armdomainservices.LdapsEnabled), - // PublicCertificate: to.Ptr("MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..."), - // }, - // NotificationSettings: &armdomainservices.NotificationSettings{ - // AdditionalRecipients: []*string{ - // to.Ptr("jicha@microsoft.com"), - // to.Ptr("caalmont@microsoft.com")}, - // NotifyDcAdmins: to.Ptr(armdomainservices.NotifyDcAdminsEnabled), - // NotifyGlobalAdmins: to.Ptr(armdomainservices.NotifyGlobalAdminsEnabled), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // ReplicaSets: []*armdomainservices.ReplicaSet{ - // { - // DomainControllerIPAddress: []*string{ - // to.Ptr("10.0.0.1"), - // to.Ptr("10.0.0.2")}, - // ExternalAccessIPAddress: to.Ptr("13.64.148.151"), - // HealthAlerts: []*armdomainservices.HealthAlert{ - // { - // Name: to.Ptr("The managed domain is experiencing a network error"), - // ID: to.Ptr("AADDS104"), - // Issue: to.Ptr("Microsoft is unable to reach the domain controllers for this managed domain. This may happen if a network security group (NSG) configured on your virtual network blocks access to the managed domain. Another possible reason is if there is a user defined route that blocks incoming traffic from the internet."), - // LastDetected: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-18T17:46:39.2697888Z"); return t}()), - // Raised: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-18T01:55:40.7834289Z"); return t}()), - // ResolutionURI: to.Ptr("https://aka.ms/aadds-neterr"), - // Severity: to.Ptr("2"), - // }}, - // HealthLastEvaluated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2018-02-15T21:43:21Z"); return t}()), - // HealthMonitors: []*armdomainservices.HealthMonitor{ - // { - // Name: to.Ptr("Backup"), - // ID: to.Ptr("AADDS501"), - // Details: to.Ptr("Last backed up on Tue, 18 Sep 2018 03:37:04 GMT"), - // }, - // { - // Name: to.Ptr("Synchronization with Azure AD"), - // ID: to.Ptr("AADDS500"), - // Details: to.Ptr("Synchronized on Tue, 18 Sep 2018 16:47:57 GMT."), - // }}, - // Location: to.Ptr("West US"), - // ReplicaSetID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // ServiceStatus: to.Ptr("Running"), - // SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS"), - // VnetSiteID: to.Ptr("99083198-a39c-469f-972d-59017e7f078c"), - // }}, - // SyncOwner: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // Version: to.Ptr[int32](2), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/CreateDomainService.json -func ExampleClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "TestResourceGroup", "TestDomainService.com", armdomainservices.DomainService{ - Properties: &armdomainservices.DomainServiceProperties{ - DomainName: to.Ptr("TestDomainService.com"), - DomainSecuritySettings: &armdomainservices.DomainSecuritySettings{ - NtlmV1: to.Ptr(armdomainservices.NtlmV1Enabled), - SyncNtlmPasswords: to.Ptr(armdomainservices.SyncNtlmPasswordsEnabled), - TLSV1: to.Ptr(armdomainservices.TLSV1Disabled), - }, - FilteredSync: to.Ptr(armdomainservices.FilteredSyncEnabled), - LdapsSettings: &armdomainservices.LdapsSettings{ - ExternalAccess: to.Ptr(armdomainservices.ExternalAccessEnabled), - Ldaps: to.Ptr(armdomainservices.LdapsEnabled), - PfxCertificate: to.Ptr("MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..."), - PfxCertificatePassword: to.Ptr(""), - }, - NotificationSettings: &armdomainservices.NotificationSettings{ - AdditionalRecipients: []*string{ - to.Ptr("jicha@microsoft.com"), - to.Ptr("caalmont@microsoft.com")}, - NotifyDcAdmins: to.Ptr(armdomainservices.NotifyDcAdminsEnabled), - NotifyGlobalAdmins: to.Ptr(armdomainservices.NotifyGlobalAdminsEnabled), - }, - ReplicaSets: []*armdomainservices.ReplicaSet{ - { - Location: to.Ptr("West US"), - SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS"), - }}, - }, - }, 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.DomainService = armdomainservices.DomainService{ - // Name: to.Ptr("TestDomainService.com"), - // Type: to.Ptr("Microsoft.AAD/DomainServices"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestResourceGroup/providers/Microsoft.AAD/DomainServices/TestDomainService.com"), - // Properties: &armdomainservices.DomainServiceProperties{ - // DeploymentID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // DomainName: to.Ptr("TestDomainService.com"), - // DomainSecuritySettings: &armdomainservices.DomainSecuritySettings{ - // NtlmV1: to.Ptr(armdomainservices.NtlmV1Enabled), - // SyncNtlmPasswords: to.Ptr(armdomainservices.SyncNtlmPasswordsEnabled), - // TLSV1: to.Ptr(armdomainservices.TLSV1Disabled), - // }, - // FilteredSync: to.Ptr(armdomainservices.FilteredSyncEnabled), - // LdapsSettings: &armdomainservices.LdapsSettings{ - // CertificateNotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-15T21:43:21Z"); return t}()), - // CertificateThumbprint: to.Ptr("9154A390F0C387D679E0DD040701745CDFED67F3"), - // ExternalAccess: to.Ptr(armdomainservices.ExternalAccessEnabled), - // Ldaps: to.Ptr(armdomainservices.LdapsEnabled), - // PublicCertificate: to.Ptr("MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..."), - // }, - // NotificationSettings: &armdomainservices.NotificationSettings{ - // AdditionalRecipients: []*string{ - // to.Ptr("jicha@microsoft.com"), - // to.Ptr("caalmont@microsoft.com")}, - // NotifyDcAdmins: to.Ptr(armdomainservices.NotifyDcAdminsEnabled), - // NotifyGlobalAdmins: to.Ptr(armdomainservices.NotifyGlobalAdminsEnabled), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // ReplicaSets: []*armdomainservices.ReplicaSet{ - // { - // DomainControllerIPAddress: []*string{ - // to.Ptr("10.0.0.1"), - // to.Ptr("10.0.0.2")}, - // ExternalAccessIPAddress: to.Ptr("13.64.148.151"), - // Location: to.Ptr("West US"), - // ReplicaSetID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // ServiceStatus: to.Ptr("Running"), - // SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS"), - // VnetSiteID: to.Ptr("99083198-a39c-469f-972d-59017e7f078c"), - // }}, - // SyncOwner: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // Version: to.Ptr[int32](2), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/GetDomainService.json -func ExampleClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewClient().Get(ctx, "TestResourceGroup", "TestDomainService.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.DomainService = armdomainservices.DomainService{ - // Name: to.Ptr("TestDomainService.com"), - // Type: to.Ptr("Microsoft.AAD/DomainServices"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestResourceGroup/providers/Microsoft.AAD/DomainServices/TestDomainService.com"), - // Properties: &armdomainservices.DomainServiceProperties{ - // DeploymentID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // DomainName: to.Ptr("TestDomainService.com"), - // DomainSecuritySettings: &armdomainservices.DomainSecuritySettings{ - // NtlmV1: to.Ptr(armdomainservices.NtlmV1Enabled), - // SyncNtlmPasswords: to.Ptr(armdomainservices.SyncNtlmPasswordsEnabled), - // TLSV1: to.Ptr(armdomainservices.TLSV1Disabled), - // }, - // FilteredSync: to.Ptr(armdomainservices.FilteredSyncEnabled), - // LdapsSettings: &armdomainservices.LdapsSettings{ - // CertificateNotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-15T21:43:21Z"); return t}()), - // CertificateThumbprint: to.Ptr("9154A390F0C387D679E0DD040701745CDFED67F3"), - // ExternalAccess: to.Ptr(armdomainservices.ExternalAccessEnabled), - // Ldaps: to.Ptr(armdomainservices.LdapsEnabled), - // PublicCertificate: to.Ptr("MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..."), - // }, - // NotificationSettings: &armdomainservices.NotificationSettings{ - // AdditionalRecipients: []*string{ - // to.Ptr("jicha@microsoft.com"), - // to.Ptr("caalmont@microsoft.com")}, - // NotifyDcAdmins: to.Ptr(armdomainservices.NotifyDcAdminsEnabled), - // NotifyGlobalAdmins: to.Ptr(armdomainservices.NotifyGlobalAdminsEnabled), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // ReplicaSets: []*armdomainservices.ReplicaSet{ - // { - // DomainControllerIPAddress: []*string{ - // to.Ptr("10.0.0.1"), - // to.Ptr("10.0.0.2")}, - // ExternalAccessIPAddress: to.Ptr("13.64.148.151"), - // HealthAlerts: []*armdomainservices.HealthAlert{ - // { - // Name: to.Ptr("The managed domain is experiencing a network error"), - // ID: to.Ptr("AADDS104"), - // Issue: to.Ptr("Microsoft is unable to reach the domain controllers for this managed domain. This may happen if a network security group (NSG) configured on your virtual network blocks access to the managed domain. Another possible reason is if there is a user defined route that blocks incoming traffic from the internet."), - // LastDetected: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-18T17:46:39.2697888Z"); return t}()), - // Raised: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-18T01:55:40.7834289Z"); return t}()), - // ResolutionURI: to.Ptr("https://aka.ms/aadds-neterr"), - // Severity: to.Ptr("2"), - // }}, - // HealthLastEvaluated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2018-02-15T21:43:21Z"); return t}()), - // HealthMonitors: []*armdomainservices.HealthMonitor{ - // { - // Name: to.Ptr("Backup"), - // ID: to.Ptr("AADDS501"), - // Details: to.Ptr("Last backed up on Tue, 18 Sep 2018 03:37:04 GMT"), - // }, - // { - // Name: to.Ptr("Synchronization with Azure AD"), - // ID: to.Ptr("AADDS500"), - // Details: to.Ptr("Synchronized on Tue, 18 Sep 2018 16:47:57 GMT."), - // }}, - // Location: to.Ptr("West US"), - // ReplicaSetID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // ServiceStatus: to.Ptr("Running"), - // SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS"), - // VnetSiteID: to.Ptr("99083198-a39c-469f-972d-59017e7f078c"), - // }}, - // SyncOwner: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // Version: to.Ptr[int32](2), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/DeleteDomainService.json -func ExampleClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginDelete(ctx, "TestResourceGroup", "TestDomainService.com", 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/UpdateDomainService.json -func ExampleClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewClient().BeginUpdate(ctx, "TestResourceGroup", "TestDomainService.com", armdomainservices.DomainService{ - Properties: &armdomainservices.DomainServiceProperties{ - ConfigDiagnostics: &armdomainservices.ConfigDiagnostics{ - LastExecuted: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2021-05-05T12:00:23Z;"); return t }()), - ValidatorResults: []*armdomainservices.ConfigDiagnosticsValidatorResult{ - { - Issues: []*armdomainservices.ConfigDiagnosticsValidatorResultIssue{ - { - DescriptionParams: []*string{}, - ID: to.Ptr("AADDS-CFG-DIAG-I20"), - }}, - ReplicaSetSubnetDisplayName: to.Ptr("West US/aadds-subnet"), - Status: to.Ptr(armdomainservices.StatusWarning), - ValidatorID: to.Ptr("AADDS-CFG-DIAG-V06"), - }}, - }, - DomainSecuritySettings: &armdomainservices.DomainSecuritySettings{ - NtlmV1: to.Ptr(armdomainservices.NtlmV1Enabled), - SyncNtlmPasswords: to.Ptr(armdomainservices.SyncNtlmPasswordsEnabled), - TLSV1: to.Ptr(armdomainservices.TLSV1Disabled), - }, - FilteredSync: to.Ptr(armdomainservices.FilteredSyncEnabled), - LdapsSettings: &armdomainservices.LdapsSettings{ - ExternalAccess: to.Ptr(armdomainservices.ExternalAccessEnabled), - Ldaps: to.Ptr(armdomainservices.LdapsEnabled), - PfxCertificate: to.Ptr("MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..."), - PfxCertificatePassword: to.Ptr(""), - }, - NotificationSettings: &armdomainservices.NotificationSettings{ - AdditionalRecipients: []*string{ - to.Ptr("jicha@microsoft.com"), - to.Ptr("caalmont@microsoft.com")}, - NotifyDcAdmins: to.Ptr(armdomainservices.NotifyDcAdminsEnabled), - NotifyGlobalAdmins: to.Ptr(armdomainservices.NotifyGlobalAdminsEnabled), - }, - ReplicaSets: []*armdomainservices.ReplicaSet{ - { - Location: to.Ptr("West US"), - SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS"), - }, - { - Location: to.Ptr("East US"), - SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetEUS/subnets/TestSubnetEUS"), - }}, - }, - }, 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.DomainService = armdomainservices.DomainService{ - // Name: to.Ptr("TestDomainService.com"), - // Type: to.Ptr("Microsoft.AAD/DomainServices"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestResourceGroup/providers/Microsoft.AAD/DomainServices/TestDomainService.com"), - // Properties: &armdomainservices.DomainServiceProperties{ - // DeploymentID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // DomainName: to.Ptr("TestDomainService.com"), - // DomainSecuritySettings: &armdomainservices.DomainSecuritySettings{ - // NtlmV1: to.Ptr(armdomainservices.NtlmV1Enabled), - // SyncNtlmPasswords: to.Ptr(armdomainservices.SyncNtlmPasswordsEnabled), - // TLSV1: to.Ptr(armdomainservices.TLSV1Disabled), - // }, - // FilteredSync: to.Ptr(armdomainservices.FilteredSyncEnabled), - // LdapsSettings: &armdomainservices.LdapsSettings{ - // CertificateNotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-15T21:43:21Z"); return t}()), - // CertificateThumbprint: to.Ptr("9154A390F0C387D679E0DD040701745CDFED67F3"), - // ExternalAccess: to.Ptr(armdomainservices.ExternalAccessEnabled), - // Ldaps: to.Ptr(armdomainservices.LdapsEnabled), - // PublicCertificate: to.Ptr("MIIDPDCCAiSgAwIBAgIQQUI9P6tq2p9OFIJa7DLNvTANBgkqhkiG9w0BAQsFADAgMR4w..."), - // }, - // NotificationSettings: &armdomainservices.NotificationSettings{ - // AdditionalRecipients: []*string{ - // to.Ptr("jicha@microsoft.com"), - // to.Ptr("caalmont@microsoft.com")}, - // NotifyDcAdmins: to.Ptr(armdomainservices.NotifyDcAdminsEnabled), - // NotifyGlobalAdmins: to.Ptr(armdomainservices.NotifyGlobalAdminsEnabled), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // ReplicaSets: []*armdomainservices.ReplicaSet{ - // { - // DomainControllerIPAddress: []*string{ - // to.Ptr("10.0.0.1"), - // to.Ptr("10.0.0.2")}, - // ExternalAccessIPAddress: to.Ptr("13.64.148.151"), - // Location: to.Ptr("West US"), - // ReplicaSetID: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // ServiceStatus: to.Ptr("Running"), - // SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetWUS/subnets/TestSubnetWUS"), - // VnetSiteID: to.Ptr("99083198-a39c-469f-972d-59017e7f078c"), - // }, - // { - // DomainControllerIPAddress: []*string{ - // to.Ptr("10.0.0.3"), - // to.Ptr("10.0.0.4")}, - // ExternalAccessIPAddress: to.Ptr("13.64.148.152"), - // Location: to.Ptr("East US"), - // ReplicaSetID: to.Ptr("5057347d-cad1-4ec8-8db6-66cf7eedf4b8"), - // ServiceStatus: to.Ptr("Running"), - // SubnetID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/TestNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/TestVnetEUS/subnets/TestSubnetEUS"), - // }}, - // SyncOwner: to.Ptr("4a619871-0150-41c4-aeb4-0b10deb7940a"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // Version: to.Ptr[int32](2), - // }, - // } -} diff --git a/sdk/resourcemanager/domainservices/armdomainservices/client_factory.go b/sdk/resourcemanager/domainservices/armdomainservices/client_factory.go index ed68faa1aed7..e9caca10d7e4 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/client_factory.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/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 armdomainservices @@ -39,18 +38,13 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewDomainServiceOperationsClient() *DomainServiceOperationsClient { - subClient, _ := NewDomainServiceOperationsClient(c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewClient() *Client { subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOuContainerOperationsClient() *OuContainerOperationsClient { - subClient, _ := NewOuContainerOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewDomainServiceOperationsClient() *DomainServiceOperationsClient { + subClient, _ := NewDomainServiceOperationsClient(c.credential, c.options) return subClient } @@ -58,3 +52,8 @@ func (c *ClientFactory) NewOuContainerClient() *OuContainerClient { subClient, _ := NewOuContainerClient(c.subscriptionID, c.credential, c.options) return subClient } + +func (c *ClientFactory) NewOuContainerOperationsClient() *OuContainerOperationsClient { + subClient, _ := NewOuContainerOperationsClient(c.credential, c.options) + return subClient +} diff --git a/sdk/resourcemanager/domainservices/armdomainservices/constants.go b/sdk/resourcemanager/domainservices/armdomainservices/constants.go index 60126e7d5af5..cd1e816d7a8c 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/constants.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/constants.go @@ -3,17 +3,32 @@ // 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 armdomainservices const ( moduleName = "armdomainservices" - moduleVersion = "v1.1.0" + moduleVersion = "v1.2.0" ) +// ChannelBinding - A flag to determine whether or not ChannelBinding is enabled or disabled. +type ChannelBinding string + +const ( + ChannelBindingDisabled ChannelBinding = "Disabled" + ChannelBindingEnabled ChannelBinding = "Enabled" +) + +// PossibleChannelBindingValues returns the possible values for the ChannelBinding const type. +func PossibleChannelBindingValues() []ChannelBinding { + return []ChannelBinding{ + ChannelBindingDisabled, + ChannelBindingEnabled, + } +} + // CreatedByType - The type of identity that created the resource. type CreatedByType string @@ -98,6 +113,22 @@ func PossibleKerberosRc4EncryptionValues() []KerberosRc4Encryption { } } +// LdapSigning - A flag to determine whether or not LdapSigning is enabled or disabled. +type LdapSigning string + +const ( + LdapSigningDisabled LdapSigning = "Disabled" + LdapSigningEnabled LdapSigning = "Enabled" +) + +// PossibleLdapSigningValues returns the possible values for the LdapSigning const type. +func PossibleLdapSigningValues() []LdapSigning { + return []LdapSigning{ + LdapSigningDisabled, + LdapSigningEnabled, + } +} + // Ldaps - A flag to determine whether or not Secure LDAP is enabled or disabled. type Ldaps string @@ -234,6 +265,22 @@ func PossibleSyncOnPremPasswordsValues() []SyncOnPremPasswords { } } +// SyncScope - All or CloudOnly, All users in AAD are synced to AAD DS domain or only users actively syncing in the cloud +type SyncScope string + +const ( + SyncScopeAll SyncScope = "All" + SyncScopeCloudOnly SyncScope = "CloudOnly" +) + +// PossibleSyncScopeValues returns the possible values for the SyncScope const type. +func PossibleSyncScopeValues() []SyncScope { + return []SyncScope{ + SyncScopeAll, + SyncScopeCloudOnly, + } +} + // TLSV1 - A flag to determine whether or not TlsV1 is enabled or disabled. type TLSV1 string diff --git a/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client.go b/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client.go index bd8228e11378..1caa89fdc3c0 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_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 armdomainservices @@ -40,7 +39,7 @@ func NewDomainServiceOperationsClient(credential azcore.TokenCredential, options // NewListPager - Lists all the available Domain Services operations. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - options - DomainServiceOperationsClientListOptions contains the optional parameters for the DomainServiceOperationsClient.NewListPager // method. func (client *DomainServiceOperationsClient) NewListPager(options *DomainServiceOperationsClientListOptions) *runtime.Pager[DomainServiceOperationsClientListResponse] { @@ -79,7 +78,7 @@ func (client *DomainServiceOperationsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client_example_test.go b/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client_example_test.go deleted file mode 100644 index f9d397d4b64a..000000000000 --- a/sdk/resourcemanager/domainservices/armdomainservices/domainserviceoperations_client_example_test.go +++ /dev/null @@ -1,96 +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 armdomainservices_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/GetOperations.json -func ExampleDomainServiceOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDomainServiceOperationsClient().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.OperationEntityListResult = armdomainservices.OperationEntityListResult{ - // Value: []*armdomainservices.OperationEntity{ - // { - // Name: to.Ptr("Microsoft.AAD/unregister/action"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Unregisters Domain Services"), - // Operation: to.Ptr("Unregister Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/register/action"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Registers Domain Services"), - // Operation: to.Ptr("Register Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/domainServices/read"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Reads Domain Services"), - // Operation: to.Ptr("Read Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/domainServices/write"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Writes Domain Services"), - // Operation: to.Ptr("Write Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/domainServices/delete"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Deletes Domain Services"), - // Operation: to.Ptr("Delete Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/domainservices/armdomainservices/go.mod b/sdk/resourcemanager/domainservices/armdomainservices/go.mod index fa049bf13ef7..a01a5da429e4 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/go.mod +++ b/sdk/resourcemanager/domainservices/armdomainservices/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armd 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/domainservices/armdomainservices/go.sum b/sdk/resourcemanager/domainservices/armdomainservices/go.sum index 8ba445a8c4da..5c6bee428364 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/go.sum +++ b/sdk/resourcemanager/domainservices/armdomainservices/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/domainservices/armdomainservices/models.go b/sdk/resourcemanager/domainservices/armdomainservices/models.go index 50663d6f8303..e4cf1828689e 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/models.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/models.go @@ -3,538 +3,476 @@ // 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 armdomainservices import "time" -// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. -type ClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. -type ClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. -type ClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientGetOptions contains the optional parameters for the Client.Get method. -type ClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. -type ClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClientListOptions contains the optional parameters for the Client.NewListPager method. -type ClientListOptions struct { - // placeholder for future optional parameters -} - // ConfigDiagnostics - Configuration Diagnostics type ConfigDiagnostics struct { // Last domain configuration diagnostics DateTime - LastExecuted *time.Time `json:"lastExecuted,omitempty"` + LastExecuted *time.Time // List of Configuration Diagnostics validator results. - ValidatorResults []*ConfigDiagnosticsValidatorResult `json:"validatorResults,omitempty"` + ValidatorResults []*ConfigDiagnosticsValidatorResult } // ConfigDiagnosticsValidatorResult - Config Diagnostics validator result data type ConfigDiagnosticsValidatorResult struct { // List of resource config validation issues. - Issues []*ConfigDiagnosticsValidatorResultIssue `json:"issues,omitempty"` + Issues []*ConfigDiagnosticsValidatorResultIssue // Replica set location and subnet name - ReplicaSetSubnetDisplayName *string `json:"replicaSetSubnetDisplayName,omitempty"` + ReplicaSetSubnetDisplayName *string // Status for individual validator after running diagnostics. - Status *Status `json:"status,omitempty"` + Status *Status // Validator identifier - ValidatorID *string `json:"validatorId,omitempty"` + ValidatorID *string } // ConfigDiagnosticsValidatorResultIssue - Specific issue for a particular config diagnostics validator type ConfigDiagnosticsValidatorResultIssue struct { // List of domain resource property name or values used to compose a rich description. - DescriptionParams []*string `json:"descriptionParams,omitempty"` + DescriptionParams []*string // Validation issue identifier. - ID *string `json:"id,omitempty"` + ID *string } // ContainerAccount - Container Account Description type ContainerAccount struct { // The account name - AccountName *string `json:"accountName,omitempty"` + AccountName *string // The account password - Password *string `json:"password,omitempty"` + Password *string // The account spn - Spn *string `json:"spn,omitempty"` + Spn *string } // DomainSecuritySettings - Domain Security Settings type DomainSecuritySettings struct { + // A flag to determine whether or not ChannelBinding is enabled or disabled. + ChannelBinding *ChannelBinding + // A flag to determine whether or not KerberosArmoring is enabled or disabled. - KerberosArmoring *KerberosArmoring `json:"kerberosArmoring,omitempty"` + KerberosArmoring *KerberosArmoring // A flag to determine whether or not KerberosRc4Encryption is enabled or disabled. - KerberosRc4Encryption *KerberosRc4Encryption `json:"kerberosRc4Encryption,omitempty"` + KerberosRc4Encryption *KerberosRc4Encryption + + // A flag to determine whether or not LdapSigning is enabled or disabled. + LdapSigning *LdapSigning // A flag to determine whether or not NtlmV1 is enabled or disabled. - NtlmV1 *NtlmV1 `json:"ntlmV1,omitempty"` + NtlmV1 *NtlmV1 // A flag to determine whether or not SyncKerberosPasswords is enabled or disabled. - SyncKerberosPasswords *SyncKerberosPasswords `json:"syncKerberosPasswords,omitempty"` + SyncKerberosPasswords *SyncKerberosPasswords // A flag to determine whether or not SyncNtlmPasswords is enabled or disabled. - SyncNtlmPasswords *SyncNtlmPasswords `json:"syncNtlmPasswords,omitempty"` + SyncNtlmPasswords *SyncNtlmPasswords // A flag to determine whether or not SyncOnPremPasswords is enabled or disabled. - SyncOnPremPasswords *SyncOnPremPasswords `json:"syncOnPremPasswords,omitempty"` + SyncOnPremPasswords *SyncOnPremPasswords // A flag to determine whether or not TlsV1 is enabled or disabled. - TLSV1 *TLSV1 `json:"tlsV1,omitempty"` + TLSV1 *TLSV1 } // DomainService - Domain service. type DomainService struct { // Resource etag - Etag *string `json:"etag,omitempty"` + Etag *string // Resource location - Location *string `json:"location,omitempty"` + Location *string // Domain service properties - Properties *DomainServiceProperties `json:"properties,omitempty"` + Properties *DomainServiceProperties // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DomainServiceListResult - The response from the List Domain Services operation. type DomainServiceListResult struct { // the list of domain services. - Value []*DomainService `json:"value,omitempty"` + Value []*DomainService // READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DomainServiceOperationsClientListOptions contains the optional parameters for the DomainServiceOperationsClient.NewListPager -// method. -type DomainServiceOperationsClientListOptions struct { - // placeholder for future optional parameters + NextLink *string } // DomainServiceProperties - Properties of the Domain Service. type DomainServiceProperties struct { // Configuration diagnostics data containing latest execution from client. - ConfigDiagnostics *ConfigDiagnostics `json:"configDiagnostics,omitempty"` + ConfigDiagnostics *ConfigDiagnostics // Domain Configuration Type - DomainConfigurationType *string `json:"domainConfigurationType,omitempty"` + DomainConfigurationType *string // The name of the Azure domain that the user would like to deploy Domain Services to. - DomainName *string `json:"domainName,omitempty"` + DomainName *string // DomainSecurity Settings - DomainSecuritySettings *DomainSecuritySettings `json:"domainSecuritySettings,omitempty"` + DomainSecuritySettings *DomainSecuritySettings // Enabled or Disabled flag to turn on Group-based filtered sync - FilteredSync *FilteredSync `json:"filteredSync,omitempty"` + FilteredSync *FilteredSync // Secure LDAP Settings - LdapsSettings *LdapsSettings `json:"ldapsSettings,omitempty"` + LdapsSettings *LdapsSettings // Notification Settings - NotificationSettings *NotificationSettings `json:"notificationSettings,omitempty"` + NotificationSettings *NotificationSettings // List of ReplicaSets - ReplicaSets []*ReplicaSet `json:"replicaSets,omitempty"` + ReplicaSets []*ReplicaSet // Resource Forest Settings - ResourceForestSettings *ResourceForestSettings `json:"resourceForestSettings,omitempty"` + ResourceForestSettings *ResourceForestSettings // Sku Type - SKU *string `json:"sku,omitempty"` + SKU *string + + // All or CloudOnly, All users in AAD are synced to AAD DS domain or only users actively syncing in the cloud + SyncScope *SyncScope // READ-ONLY; Deployment Id - DeploymentID *string `json:"deploymentId,omitempty" azure:"ro"` + DeploymentID *string // READ-ONLY; Migration Properties - MigrationProperties *MigrationProperties `json:"migrationProperties,omitempty" azure:"ro"` + MigrationProperties *MigrationProperties // READ-ONLY; the current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *string + + // READ-ONLY; The unique sync application id of the Azure AD Domain Services deployment. + SyncApplicationID *string // READ-ONLY; SyncOwner ReplicaSet Id - SyncOwner *string `json:"syncOwner,omitempty" azure:"ro"` + SyncOwner *string // READ-ONLY; Azure Active Directory Tenant Id - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string // READ-ONLY; Data Model Version - Version *int32 `json:"version,omitempty" azure:"ro"` + Version *int32 } // ForestTrust - Forest Trust Setting type ForestTrust struct { // Friendly Name - FriendlyName *string `json:"friendlyName,omitempty"` + FriendlyName *string // Remote Dns ips - RemoteDNSIPs *string `json:"remoteDnsIps,omitempty"` + RemoteDNSIPs *string // Trust Direction - TrustDirection *string `json:"trustDirection,omitempty"` + TrustDirection *string // Trust Password - TrustPassword *string `json:"trustPassword,omitempty"` + TrustPassword *string // Trusted Domain FQDN - TrustedDomainFqdn *string `json:"trustedDomainFqdn,omitempty"` + TrustedDomainFqdn *string } // HealthAlert - Health Alert Description type HealthAlert struct { // READ-ONLY; Health Alert Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Health Alert Issue - Issue *string `json:"issue,omitempty" azure:"ro"` + Issue *string // READ-ONLY; Health Alert Last Detected DateTime - LastDetected *time.Time `json:"lastDetected,omitempty" azure:"ro"` + LastDetected *time.Time // READ-ONLY; Health Alert Name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Health Alert Raised DateTime - Raised *time.Time `json:"raised,omitempty" azure:"ro"` + Raised *time.Time // READ-ONLY; Health Alert TSG Link - ResolutionURI *string `json:"resolutionUri,omitempty" azure:"ro"` + ResolutionURI *string // READ-ONLY; Health Alert Severity - Severity *string `json:"severity,omitempty" azure:"ro"` + Severity *string } // HealthMonitor - Health Monitor Description type HealthMonitor struct { // READ-ONLY; Health Monitor Details - Details *string `json:"details,omitempty" azure:"ro"` + Details *string // READ-ONLY; Health Monitor Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Health Monitor Name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string } // LdapsSettings - Secure LDAP Settings type LdapsSettings struct { // A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled. - ExternalAccess *ExternalAccess `json:"externalAccess,omitempty"` + ExternalAccess *ExternalAccess // A flag to determine whether or not Secure LDAP is enabled or disabled. - Ldaps *Ldaps `json:"ldaps,omitempty"` + Ldaps *Ldaps // The certificate required to configure Secure LDAP. The parameter passed here should be a base64encoded representation of // the certificate pfx file. - PfxCertificate *string `json:"pfxCertificate,omitempty"` + PfxCertificate *string // The password to decrypt the provided Secure LDAP certificate pfx file. - PfxCertificatePassword *string `json:"pfxCertificatePassword,omitempty"` + PfxCertificatePassword *string // READ-ONLY; NotAfter DateTime of configure ldaps certificate. - CertificateNotAfter *time.Time `json:"certificateNotAfter,omitempty" azure:"ro"` + CertificateNotAfter *time.Time // READ-ONLY; Thumbprint of configure ldaps certificate. - CertificateThumbprint *string `json:"certificateThumbprint,omitempty" azure:"ro"` + CertificateThumbprint *string // READ-ONLY; Public certificate used to configure secure ldap. - PublicCertificate *string `json:"publicCertificate,omitempty" azure:"ro"` + PublicCertificate *string } // MigrationProgress - Migration Progress type MigrationProgress struct { // Completion Percentage - CompletionPercentage *float64 `json:"completionPercentage,omitempty"` + CompletionPercentage *float64 // Progress Message - ProgressMessage *string `json:"progressMessage,omitempty"` + ProgressMessage *string } // MigrationProperties - Migration Properties type MigrationProperties struct { // READ-ONLY; Migration Progress - MigrationProgress *MigrationProgress `json:"migrationProgress,omitempty" azure:"ro"` + MigrationProgress *MigrationProgress // READ-ONLY; Old Subnet Id - OldSubnetID *string `json:"oldSubnetId,omitempty" azure:"ro"` + OldSubnetID *string // READ-ONLY; Old Vnet Site Id - OldVnetSiteID *string `json:"oldVnetSiteId,omitempty" azure:"ro"` + OldVnetSiteID *string } // NotificationSettings - Settings for notification type NotificationSettings struct { // The list of additional recipients - AdditionalRecipients []*string `json:"additionalRecipients,omitempty"` + AdditionalRecipients []*string // Should domain controller admins be notified - NotifyDcAdmins *NotifyDcAdmins `json:"notifyDcAdmins,omitempty"` + NotifyDcAdmins *NotifyDcAdmins // Should global admins be notified - NotifyGlobalAdmins *NotifyGlobalAdmins `json:"notifyGlobalAdmins,omitempty"` + NotifyGlobalAdmins *NotifyGlobalAdmins } // OperationDisplayInfo - The operation supported by Domain Services. type OperationDisplayInfo struct { // The description of the operation. - Description *string `json:"description,omitempty"` + Description *string // The action that users can perform, based on their permission level. - Operation *string `json:"operation,omitempty"` + Operation *string // Service provider: Domain Services. - Provider *string `json:"provider,omitempty"` + Provider *string // Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` + Resource *string } // OperationEntity - The operation supported by Domain Services. type OperationEntity struct { // The operation supported by Domain Services. - Display *OperationDisplayInfo `json:"display,omitempty"` + Display *OperationDisplayInfo // Operation name: {provider}/{resource}/{operation}. - Name *string `json:"name,omitempty"` + Name *string // The origin of the operation. - Origin *string `json:"origin,omitempty"` + Origin *string } // OperationEntityListResult - The list of domain service operation response. type OperationEntityListResult struct { // The list of operations. - Value []*OperationEntity `json:"value,omitempty"` + Value []*OperationEntity // READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + NextLink *string } // OuContainer - Resource for OuContainer. type OuContainer struct { // Resource etag - Etag *string `json:"etag,omitempty"` + Etag *string // Resource location - Location *string `json:"location,omitempty"` + Location *string // OuContainer properties - Properties *OuContainerProperties `json:"properties,omitempty"` + Properties *OuContainerProperties // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// OuContainerClientBeginCreateOptions contains the optional parameters for the OuContainerClient.BeginCreate method. -type OuContainerClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OuContainerClientBeginDeleteOptions contains the optional parameters for the OuContainerClient.BeginDelete method. -type OuContainerClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OuContainerClientBeginUpdateOptions contains the optional parameters for the OuContainerClient.BeginUpdate method. -type OuContainerClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OuContainerClientGetOptions contains the optional parameters for the OuContainerClient.Get method. -type OuContainerClientGetOptions struct { - // placeholder for future optional parameters -} - -// OuContainerClientListOptions contains the optional parameters for the OuContainerClient.NewListPager method. -type OuContainerClientListOptions struct { - // placeholder for future optional parameters + Type *string } // OuContainerListResult - The response from the List OuContainer operation. type OuContainerListResult struct { // The list of OuContainer. - Value []*OuContainer `json:"value,omitempty"` + Value []*OuContainer // READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// OuContainerOperationsClientListOptions contains the optional parameters for the OuContainerOperationsClient.NewListPager -// method. -type OuContainerOperationsClientListOptions struct { - // placeholder for future optional parameters + NextLink *string } // OuContainerProperties - Properties of the OuContainer. type OuContainerProperties struct { // The list of container accounts - Accounts []*ContainerAccount `json:"accounts,omitempty"` + Accounts []*ContainerAccount // READ-ONLY; The OuContainer name - ContainerID *string `json:"containerId,omitempty" azure:"ro"` + ContainerID *string // READ-ONLY; The Deployment id - DeploymentID *string `json:"deploymentId,omitempty" azure:"ro"` + DeploymentID *string // READ-ONLY; Distinguished Name of OuContainer instance - DistinguishedName *string `json:"distinguishedName,omitempty" azure:"ro"` + DistinguishedName *string // READ-ONLY; The domain name of Domain Services. - DomainName *string `json:"domainName,omitempty" azure:"ro"` + DomainName *string // READ-ONLY; The current deployment or provisioning state, which only appears in the response. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *string // READ-ONLY; Status of OuContainer instance - ServiceStatus *string `json:"serviceStatus,omitempty" azure:"ro"` + ServiceStatus *string // READ-ONLY; Azure Active Directory tenant id - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + TenantID *string } // ReplicaSet - Replica Set Definition type ReplicaSet struct { // Virtual network location - Location *string `json:"location,omitempty"` + Location *string // The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will // be deployed on. /virtualNetwork/vnetName/subnets/subnetName. - SubnetID *string `json:"subnetId,omitempty"` + SubnetID *string // READ-ONLY; List of Domain Controller IP Address - DomainControllerIPAddress []*string `json:"domainControllerIpAddress,omitempty" azure:"ro"` + DomainControllerIPAddress []*string // READ-ONLY; External access ip address. - ExternalAccessIPAddress *string `json:"externalAccessIpAddress,omitempty" azure:"ro"` + ExternalAccessIPAddress *string // READ-ONLY; List of Domain Health Alerts - HealthAlerts []*HealthAlert `json:"healthAlerts,omitempty" azure:"ro"` + HealthAlerts []*HealthAlert // READ-ONLY; Last domain evaluation run DateTime - HealthLastEvaluated *time.Time `json:"healthLastEvaluated,omitempty" azure:"ro"` + HealthLastEvaluated *time.Time // READ-ONLY; List of Domain Health Monitors - HealthMonitors []*HealthMonitor `json:"healthMonitors,omitempty" azure:"ro"` + HealthMonitors []*HealthMonitor // READ-ONLY; ReplicaSet Id - ReplicaSetID *string `json:"replicaSetId,omitempty" azure:"ro"` + ReplicaSetID *string // READ-ONLY; Status of Domain Service instance - ServiceStatus *string `json:"serviceStatus,omitempty" azure:"ro"` + ServiceStatus *string // READ-ONLY; Virtual network site id - VnetSiteID *string `json:"vnetSiteId,omitempty" azure:"ro"` + VnetSiteID *string } // Resource - The Resource model definition. type Resource struct { // Resource etag - Etag *string `json:"etag,omitempty"` + Etag *string // Resource location - Location *string `json:"location,omitempty"` + Location *string // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ResourceForestSettings - Settings for Resource Forest type ResourceForestSettings struct { // Resource Forest - ResourceForest *string `json:"resourceForest,omitempty"` + ResourceForest *string // List of settings for Resource Forest - Settings []*ForestTrust `json:"settings,omitempty"` + Settings []*ForestTrust } // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` + CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *CreatedByType } diff --git a/sdk/resourcemanager/domainservices/armdomainservices/models_serde.go b/sdk/resourcemanager/domainservices/armdomainservices/models_serde.go index 5b9e790f7e71..8602bac8afd4 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/models_serde.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/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 armdomainservices @@ -155,8 +154,10 @@ func (c *ContainerAccount) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DomainSecuritySettings. func (d DomainSecuritySettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "channelBinding", d.ChannelBinding) populate(objectMap, "kerberosArmoring", d.KerberosArmoring) populate(objectMap, "kerberosRc4Encryption", d.KerberosRc4Encryption) + populate(objectMap, "ldapSigning", d.LdapSigning) populate(objectMap, "ntlmV1", d.NtlmV1) populate(objectMap, "syncKerberosPasswords", d.SyncKerberosPasswords) populate(objectMap, "syncNtlmPasswords", d.SyncNtlmPasswords) @@ -174,12 +175,18 @@ func (d *DomainSecuritySettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "channelBinding": + err = unpopulate(val, "ChannelBinding", &d.ChannelBinding) + delete(rawMsg, key) case "kerberosArmoring": err = unpopulate(val, "KerberosArmoring", &d.KerberosArmoring) delete(rawMsg, key) case "kerberosRc4Encryption": err = unpopulate(val, "KerberosRc4Encryption", &d.KerberosRc4Encryption) delete(rawMsg, key) + case "ldapSigning": + err = unpopulate(val, "LdapSigning", &d.LdapSigning) + delete(rawMsg, key) case "ntlmV1": err = unpopulate(val, "NtlmV1", &d.NtlmV1) delete(rawMsg, key) @@ -305,7 +312,9 @@ func (d DomainServiceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "replicaSets", d.ReplicaSets) populate(objectMap, "resourceForestSettings", d.ResourceForestSettings) populate(objectMap, "sku", d.SKU) + populate(objectMap, "syncApplicationId", d.SyncApplicationID) populate(objectMap, "syncOwner", d.SyncOwner) + populate(objectMap, "syncScope", d.SyncScope) populate(objectMap, "tenantId", d.TenantID) populate(objectMap, "version", d.Version) return json.Marshal(objectMap) @@ -359,9 +368,15 @@ func (d *DomainServiceProperties) UnmarshalJSON(data []byte) error { case "sku": err = unpopulate(val, "SKU", &d.SKU) delete(rawMsg, key) + case "syncApplicationId": + err = unpopulate(val, "SyncApplicationID", &d.SyncApplicationID) + delete(rawMsg, key) case "syncOwner": err = unpopulate(val, "SyncOwner", &d.SyncOwner) delete(rawMsg, key) + case "syncScope": + err = unpopulate(val, "SyncScope", &d.SyncScope) + delete(rawMsg, key) case "tenantId": err = unpopulate(val, "TenantID", &d.TenantID) delete(rawMsg, key) diff --git a/sdk/resourcemanager/domainservices/armdomainservices/options.go b/sdk/resourcemanager/domainservices/armdomainservices/options.go new file mode 100644 index 000000000000..35978c79e8eb --- /dev/null +++ b/sdk/resourcemanager/domainservices/armdomainservices/options.go @@ -0,0 +1,82 @@ +//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 armdomainservices + +// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. +type ClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. +type ClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. +type ClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. +type ClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClientListOptions contains the optional parameters for the Client.NewListPager method. +type ClientListOptions struct { + // placeholder for future optional parameters +} + +// DomainServiceOperationsClientListOptions contains the optional parameters for the DomainServiceOperationsClient.NewListPager +// method. +type DomainServiceOperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OuContainerClientBeginCreateOptions contains the optional parameters for the OuContainerClient.BeginCreate method. +type OuContainerClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OuContainerClientBeginDeleteOptions contains the optional parameters for the OuContainerClient.BeginDelete method. +type OuContainerClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OuContainerClientBeginUpdateOptions contains the optional parameters for the OuContainerClient.BeginUpdate method. +type OuContainerClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OuContainerClientGetOptions contains the optional parameters for the OuContainerClient.Get method. +type OuContainerClientGetOptions struct { + // placeholder for future optional parameters +} + +// OuContainerClientListOptions contains the optional parameters for the OuContainerClient.NewListPager method. +type OuContainerClientListOptions struct { + // placeholder for future optional parameters +} + +// OuContainerOperationsClientListOptions contains the optional parameters for the OuContainerOperationsClient.NewListPager +// method. +type OuContainerOperationsClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client.go b/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client.go index 8a617ebedf28..68fc101731ed 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_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 armdomainservices @@ -48,7 +47,7 @@ func NewOuContainerClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreate - The Create OuContainer operation creates a new OuContainer under the specified Domain Service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - ouContainerName - The name of the OuContainer. @@ -60,7 +59,8 @@ func (client *OuContainerClient) BeginCreate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[OuContainerClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[OuContainerClientCreateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[OuContainerClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -69,20 +69,22 @@ func (client *OuContainerClient) BeginCreate(ctx context.Context, resourceGroupN // Create - The Create OuContainer operation creates a new OuContainer under the specified Domain Service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 func (client *OuContainerClient) create(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, containerAccount ContainerAccount, options *OuContainerClientBeginCreateOptions) (*http.Response, error) { + var err error req, err := client.createCreateRequest(ctx, resourceGroupName, domainServiceName, ouContainerName, containerAccount, 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, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -109,16 +111,19 @@ func (client *OuContainerClient) createCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAccount) + if err := runtime.MarshalAsJSON(req, containerAccount); err != nil { + return nil, err + } + return req, nil } // BeginDelete - The Delete OuContainer operation deletes specified OuContainer. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - ouContainerName - The name of the OuContainer. @@ -129,7 +134,8 @@ func (client *OuContainerClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[OuContainerClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[OuContainerClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[OuContainerClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -138,20 +144,22 @@ func (client *OuContainerClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - The Delete OuContainer operation deletes specified OuContainer. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 func (client *OuContainerClient) deleteOperation(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, options *OuContainerClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, domainServiceName, ouContainerName, 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, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -178,7 +186,7 @@ func (client *OuContainerClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,24 +195,27 @@ func (client *OuContainerClient) deleteCreateRequest(ctx context.Context, resour // Get - Get OuContainer in DomainService instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - ouContainerName - The name of the OuContainer. // - options - OuContainerClientGetOptions contains the optional parameters for the OuContainerClient.Get method. func (client *OuContainerClient) Get(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, options *OuContainerClientGetOptions) (OuContainerClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, domainServiceName, ouContainerName, options) if err != nil { return OuContainerClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OuContainerClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OuContainerClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OuContainerClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -231,7 +242,7 @@ func (client *OuContainerClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +259,7 @@ func (client *OuContainerClient) getHandleResponse(resp *http.Response) (OuConta // NewListPager - The List of OuContainers in DomainService instance. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - options - OuContainerClientListOptions contains the optional parameters for the OuContainerClient.NewListPager method. @@ -300,7 +311,7 @@ func (client *OuContainerClient) listCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -318,7 +329,7 @@ func (client *OuContainerClient) listHandleResponse(resp *http.Response) (OuCont // BeginUpdate - The Update OuContainer operation can be used to update the existing OuContainers. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive. // - domainServiceName - The name of the domain service. // - ouContainerName - The name of the OuContainer. @@ -330,7 +341,8 @@ func (client *OuContainerClient) BeginUpdate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[OuContainerClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[OuContainerClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[OuContainerClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -339,20 +351,22 @@ func (client *OuContainerClient) BeginUpdate(ctx context.Context, resourceGroupN // Update - The Update OuContainer operation can be used to update the existing OuContainers. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 func (client *OuContainerClient) update(ctx context.Context, resourceGroupName string, domainServiceName string, ouContainerName string, containerAccount ContainerAccount, options *OuContainerClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, domainServiceName, ouContainerName, containerAccount, 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 } // updateCreateRequest creates the Update request. @@ -379,8 +393,11 @@ func (client *OuContainerClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAccount) + if err := runtime.MarshalAsJSON(req, containerAccount); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client_example_test.go b/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client_example_test.go deleted file mode 100644 index 63c7c58c0a60..000000000000 --- a/sdk/resourcemanager/domainservices/armdomainservices/oucontainer_client_example_test.go +++ /dev/null @@ -1,254 +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 armdomainservices_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/domainservices/armdomainservices" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/ListOuContainers.json -func ExampleOuContainerClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOuContainerClient().NewListPager("OuContainerResourceGroup", "OuContainer.com", 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.OuContainerListResult = armdomainservices.OuContainerListResult{ - // Value: []*armdomainservices.OuContainer{ - // { - // Name: to.Ptr("OuContainer.com/OuContainer1"), - // Type: to.Ptr("Microsoft.AAD/DomainServices/OuContainer"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/ouContainerResourceGroup/providers/Microsoft.AAD/domainServices/ouContainer.com/ouContainer/ouContainer1"), - // Properties: &armdomainservices.OuContainerProperties{ - // Accounts: []*armdomainservices.ContainerAccount{ - // { - // AccountName: to.Ptr("AccountName1"), - // Spn: to.Ptr("Spn1"), - // }, - // { - // AccountName: to.Ptr("AccountName2"), - // Spn: to.Ptr("Spn2"), - // }}, - // ContainerID: to.Ptr("OuContainer1"), - // DeploymentID: to.Ptr("0FC50BDB-AC45-48E4-BC92-F0651EA0687B"), - // DomainName: to.Ptr("OuContainer.com"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceStatus: to.Ptr("Running"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // }, - // }, - // { - // Name: to.Ptr("OuContainer.com/OuContainer2"), - // Type: to.Ptr("Microsoft.AAD/DomainServices/OuContainer"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/ouContainerResourceGroup/providers/Microsoft.AAD/domainServices/ouContainer.com/ouContainer/ouContainer2"), - // Properties: &armdomainservices.OuContainerProperties{ - // Accounts: []*armdomainservices.ContainerAccount{ - // { - // AccountName: to.Ptr("AccountName3"), - // Spn: to.Ptr("Spn3"), - // }, - // { - // AccountName: to.Ptr("AccountName4"), - // Spn: to.Ptr("Spn4"), - // }}, - // ContainerID: to.Ptr("OuContainer2"), - // DeploymentID: to.Ptr("0FC50BDB-AC45-48E4-BC92-F0651EA0687B"), - // DomainName: to.Ptr("OuContainer.com"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceStatus: to.Ptr("Running"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/GetOuContainer.json -func ExampleOuContainerClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOuContainerClient().Get(ctx, "OuContainerResourceGroup", "OuContainer.com", "OuContainer1", 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.OuContainer = armdomainservices.OuContainer{ - // Name: to.Ptr("OuContainer.com/OuContainer1"), - // Type: to.Ptr("Microsoft.AAD/DomainServices/OuContainer"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/ouContainerResourceGroup/providers/Microsoft.AAD/domainServices/ouContainer.com/ouContainer/ouContainer1"), - // Properties: &armdomainservices.OuContainerProperties{ - // Accounts: []*armdomainservices.ContainerAccount{ - // { - // AccountName: to.Ptr("AccountName1"), - // Spn: to.Ptr("Spn1"), - // }, - // { - // AccountName: to.Ptr("AccountName2"), - // Spn: to.Ptr("Spn2"), - // }}, - // ContainerID: to.Ptr("OuContainer1"), - // DeploymentID: to.Ptr("0FC50BDB-AC45-48E4-BC92-F0651EA0687B"), - // DomainName: to.Ptr("OuContainer.com"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceStatus: to.Ptr("Running"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/CreateOuContainer.json -func ExampleOuContainerClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewOuContainerClient().BeginCreate(ctx, "OuContainerResourceGroup", "OuContainer.com", "OuContainer1", armdomainservices.ContainerAccount{ - AccountName: to.Ptr("AccountName1"), - Password: to.Ptr(""), - Spn: to.Ptr("Spn1"), - }, 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.OuContainer = armdomainservices.OuContainer{ - // Name: to.Ptr("OuContainer.com/OuContainer1"), - // Type: to.Ptr("Microsoft.AAD/DomainServices/OuContainer"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/ouContainerResourceGroup/providers/Microsoft.AAD/domainServices/ouContainer.com/ouContainer/ouContainer1"), - // Properties: &armdomainservices.OuContainerProperties{ - // Accounts: []*armdomainservices.ContainerAccount{ - // { - // AccountName: to.Ptr("AccountName1"), - // Spn: to.Ptr("Spn1"), - // }, - // { - // AccountName: to.Ptr("AccountName2"), - // Spn: to.Ptr("Spn2"), - // }}, - // ContainerID: to.Ptr("OuContainer1"), - // DeploymentID: to.Ptr("0FC50BDB-AC45-48E4-BC92-F0651EA0687B"), - // DomainName: to.Ptr("OuContainer.com"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceStatus: to.Ptr("Running"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/DeleteOuContainer.json -func ExampleOuContainerClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewOuContainerClient().BeginDelete(ctx, "OuContainerResourceGroup", "OuContainer.com", "OuContainer1", 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/UpdateOuContainer.json -func ExampleOuContainerClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewOuContainerClient().BeginUpdate(ctx, "OuContainerResourceGroup", "OuContainer.com", "OuContainer1", armdomainservices.ContainerAccount{ - AccountName: to.Ptr("AccountName1"), - Password: to.Ptr(""), - Spn: to.Ptr("Spn1"), - }, 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.OuContainer = armdomainservices.OuContainer{ - // Name: to.Ptr("OuContainer.com/OuContainer1"), - // Type: to.Ptr("Microsoft.AAD/DomainServices/OuContainer"), - // ID: to.Ptr("/subscriptions/1639790a-76a2-4ac4-98d9-8562f5dfcb4d/resourceGroups/ouContainerResourceGroup/providers/Microsoft.AAD/domainServices/ouContainer.com/ouContainer/ouContainer1"), - // Properties: &armdomainservices.OuContainerProperties{ - // Accounts: []*armdomainservices.ContainerAccount{ - // { - // AccountName: to.Ptr("AccountName1"), - // Spn: to.Ptr("Spn1"), - // }, - // { - // AccountName: to.Ptr("AccountName2"), - // Spn: to.Ptr("Spn2"), - // }}, - // ContainerID: to.Ptr("OuContainer1"), - // DeploymentID: to.Ptr("0FC50BDB-AC45-48E4-BC92-F0651EA0687B"), - // DomainName: to.Ptr("OuContainer.com"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceStatus: to.Ptr("Running"), - // TenantID: to.Ptr("3f8cd22c-7b32-48aa-a01c-f533133b1def"), - // }, - // } -} diff --git a/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client.go b/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client.go index 5b1095e2f07a..f3632cc74f80 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_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 armdomainservices @@ -40,7 +39,7 @@ func NewOuContainerOperationsClient(credential azcore.TokenCredential, options * // NewListPager - Lists all the available OuContainer operations. // -// Generated from API version 2021-05-01 +// Generated from API version 2022-12-01 // - options - OuContainerOperationsClientListOptions contains the optional parameters for the OuContainerOperationsClient.NewListPager // method. func (client *OuContainerOperationsClient) NewListPager(options *OuContainerOperationsClientListOptions) *runtime.Pager[OuContainerOperationsClientListResponse] { @@ -79,7 +78,7 @@ func (client *OuContainerOperationsClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-05-01") + reqQP.Set("api-version", "2022-12-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client_example_test.go b/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client_example_test.go deleted file mode 100644 index 29cf9e3f7c0f..000000000000 --- a/sdk/resourcemanager/domainservices/armdomainservices/oucontaineroperations_client_example_test.go +++ /dev/null @@ -1,96 +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 armdomainservices_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/domainservices/resource-manager/Microsoft.AAD/stable/2021-05-01/examples/GetOperations.json -func ExampleOuContainerOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armdomainservices.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOuContainerOperationsClient().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.OperationEntityListResult = armdomainservices.OperationEntityListResult{ - // Value: []*armdomainservices.OperationEntity{ - // { - // Name: to.Ptr("Microsoft.AAD/unregister/action"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Unregisters Domain Services"), - // Operation: to.Ptr("Unregister Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/register/action"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Registers Domain Services"), - // Operation: to.Ptr("Register Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/domainServices/read"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Reads Domain Services"), - // Operation: to.Ptr("Read Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/domainServices/write"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Writes Domain Services"), - // Operation: to.Ptr("Write Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.AAD/domainServices/delete"), - // Display: &armdomainservices.OperationDisplayInfo{ - // Description: to.Ptr("Deletes Domain Services"), - // Operation: to.Ptr("Delete Domain Service"), - // Provider: to.Ptr("Domain Services Resource Provider"), - // Resource: to.Ptr("Domain Service Type"), - // }, - // Origin: to.Ptr("user,system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/domainservices/armdomainservices/response_types.go b/sdk/resourcemanager/domainservices/armdomainservices/response_types.go index 0ed4b07125af..2c477ae0d1df 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/response_types.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/response_types.go @@ -3,14 +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 armdomainservices // ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate. type ClientCreateOrUpdateResponse struct { + // Domain service. DomainService } @@ -21,31 +21,37 @@ type ClientDeleteResponse struct { // ClientGetResponse contains the response from method Client.Get. type ClientGetResponse struct { + // Domain service. DomainService } // ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager. type ClientListByResourceGroupResponse struct { + // The response from the List Domain Services operation. DomainServiceListResult } // ClientListResponse contains the response from method Client.NewListPager. type ClientListResponse struct { + // The response from the List Domain Services operation. DomainServiceListResult } // ClientUpdateResponse contains the response from method Client.BeginUpdate. type ClientUpdateResponse struct { + // Domain service. DomainService } // DomainServiceOperationsClientListResponse contains the response from method DomainServiceOperationsClient.NewListPager. type DomainServiceOperationsClientListResponse struct { + // The list of domain service operation response. OperationEntityListResult } // OuContainerClientCreateResponse contains the response from method OuContainerClient.BeginCreate. type OuContainerClientCreateResponse struct { + // Resource for OuContainer. OuContainer } @@ -56,20 +62,24 @@ type OuContainerClientDeleteResponse struct { // OuContainerClientGetResponse contains the response from method OuContainerClient.Get. type OuContainerClientGetResponse struct { + // Resource for OuContainer. OuContainer } // OuContainerClientListResponse contains the response from method OuContainerClient.NewListPager. type OuContainerClientListResponse struct { + // The response from the List OuContainer operation. OuContainerListResult } // OuContainerClientUpdateResponse contains the response from method OuContainerClient.BeginUpdate. type OuContainerClientUpdateResponse struct { + // Resource for OuContainer. OuContainer } // OuContainerOperationsClientListResponse contains the response from method OuContainerOperationsClient.NewListPager. type OuContainerOperationsClientListResponse struct { + // The list of domain service operation response. OperationEntityListResult } diff --git a/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.go b/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.go index 110f9512c4a5..78aa4e2f4076 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/time_rfc1123.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 armdomainservices diff --git a/sdk/resourcemanager/domainservices/armdomainservices/time_rfc3339.go b/sdk/resourcemanager/domainservices/armdomainservices/time_rfc3339.go index 4f3a6dda8f65..2ea3cffca4fe 100644 --- a/sdk/resourcemanager/domainservices/armdomainservices/time_rfc3339.go +++ b/sdk/resourcemanager/domainservices/armdomainservices/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 armdomainservices