diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/CHANGELOG.md b/sdk/resourcemanager/resourceconnector/armresourceconnector/CHANGELOG.md index e202651370b8..dd9e4d7d2f07 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/CHANGELOG.md +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/CHANGELOG.md @@ -1,5 +1,46 @@ # Release History +## 1.0.0 (2022-11-09) +### Breaking Changes + +- Function `*AppliancesClient.ListClusterCustomerUserCredential` has been removed +- Struct `ApplianceListClusterCustomerUserCredentialResults` has been removed +- Struct `AppliancesClientListClusterCustomerUserCredentialOptions` has been removed +- Struct `AppliancesClientListClusterCustomerUserCredentialResponse` has been removed + +### Features Added + +- New const `SSHKeyTypeScopedAccessKey` +- New const `StatusImageDeprovisioning` +- New const `StatusImageProvisioned` +- New const `StatusImageDownloaded` +- New const `StatusImageProvisioning` +- New const `StatusUpgradingKVAIO` +- New const `ArtifactTypeLogsArtifactType` +- New const `SSHKeyTypeLogsKey` +- New const `StatusImagePending` +- New const `StatusWaitingForKVAIO` +- New const `SSHKeyTypeManagementCAKey` +- New const `StatusImageUnknown` +- New const `StatusImageDownloading` +- New type alias `ArtifactType` +- New function `*AppliancesClient.ListKeys(context.Context, string, string, *AppliancesClientListKeysOptions) (AppliancesClientListKeysResponse, error)` +- New function `*AppliancesClient.GetTelemetryConfig(context.Context, *AppliancesClientGetTelemetryConfigOptions) (AppliancesClientGetTelemetryConfigResponse, error)` +- New function `PossibleArtifactTypeValues() []ArtifactType` +- New struct `ApplianceGetTelemetryConfigResult` +- New struct `ApplianceListKeysResults` +- New struct `AppliancesClientGetTelemetryConfigOptions` +- New struct `AppliancesClientGetTelemetryConfigResponse` +- New struct `AppliancesClientListKeysOptions` +- New struct `AppliancesClientListKeysResponse` +- New struct `ArtifactProfile` +- New field `SystemData` in struct `Resource` +- New field `SystemData` in struct `TrackedResource` +- New field `Certificate` in struct `SSHKey` +- New field `CreationTimeStamp` in struct `SSHKey` +- New field `ExpirationTimeStamp` in struct `SSHKey` + + ## 0.2.0 (2022-06-28) ### Features Added diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/appliances_client.go b/sdk/resourcemanager/resourceconnector/armresourceconnector/appliances_client.go index be326947d1a6..ac71f9ee5c55 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/appliances_client.go +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/appliances_client.go @@ -57,7 +57,7 @@ func NewAppliancesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates an Appliance in the specified Subscription and Resource Group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // resourceName - Appliances name. // parameters - Parameters supplied to create or update an Appliance. @@ -79,7 +79,7 @@ func (client *AppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates an Appliance in the specified Subscription and Resource Group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 func (client *AppliancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters Appliance, options *AppliancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) if err != nil { @@ -115,7 +115,7 @@ func (client *AppliancesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ func (client *AppliancesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // resourceName - Appliances name. // options - AppliancesClientBeginDeleteOptions contains the optional parameters for the AppliancesClient.BeginDelete method. @@ -143,7 +143,7 @@ func (client *AppliancesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 func (client *AppliancesClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { @@ -179,7 +179,7 @@ func (client *AppliancesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ func (client *AppliancesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets the details of an Appliance with a specified resource group and name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // resourceName - Appliances name. // options - AppliancesClientGetOptions contains the optional parameters for the AppliancesClient.Get method. @@ -226,7 +226,7 @@ func (client *AppliancesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,10 +241,57 @@ func (client *AppliancesClient) getHandleResponse(resp *http.Response) (Applianc return result, nil } +// GetTelemetryConfig - Gets the telemetry config. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-10-27 +// options - AppliancesClientGetTelemetryConfigOptions contains the optional parameters for the AppliancesClient.GetTelemetryConfig +// method. +func (client *AppliancesClient) GetTelemetryConfig(ctx context.Context, options *AppliancesClientGetTelemetryConfigOptions) (AppliancesClientGetTelemetryConfigResponse, error) { + req, err := client.getTelemetryConfigCreateRequest(ctx, options) + if err != nil { + return AppliancesClientGetTelemetryConfigResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AppliancesClientGetTelemetryConfigResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AppliancesClientGetTelemetryConfigResponse{}, runtime.NewResponseError(resp) + } + return client.getTelemetryConfigHandleResponse(resp) +} + +// getTelemetryConfigCreateRequest creates the GetTelemetryConfig request. +func (client *AppliancesClient) getTelemetryConfigCreateRequest(ctx context.Context, options *AppliancesClientGetTelemetryConfigOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/telemetryconfig" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-10-27") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getTelemetryConfigHandleResponse handles the GetTelemetryConfig response. +func (client *AppliancesClient) getTelemetryConfigHandleResponse(resp *http.Response) (AppliancesClientGetTelemetryConfigResponse, error) { + result := AppliancesClientGetTelemetryConfigResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplianceGetTelemetryConfigResult); err != nil { + return AppliancesClientGetTelemetryConfigResponse{}, err + } + return result, nil +} + // GetUpgradeGraph - Gets the upgrade graph of an Appliance with a specified resource group and name and specific release // train. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // resourceName - Appliances name. // upgradeGraph - Upgrade graph version, ex - stable @@ -289,7 +336,7 @@ func (client *AppliancesClient) getUpgradeGraphCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,8 +353,7 @@ func (client *AppliancesClient) getUpgradeGraphHandleResponse(resp *http.Respons // NewListByResourceGroupPager - Gets a list of Appliances in the specified subscription and resource group. The operation // returns properties of each Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // options - AppliancesClientListByResourceGroupOptions contains the optional parameters for the AppliancesClient.ListByResourceGroup // method. @@ -355,7 +401,7 @@ func (client *AppliancesClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -372,8 +418,7 @@ func (client *AppliancesClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Gets a list of Appliances in the specified subscription. The operation returns properties // of each Appliance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // options - AppliancesClientListBySubscriptionOptions contains the optional parameters for the AppliancesClient.ListBySubscription // method. func (client *AppliancesClient) NewListBySubscriptionPager(options *AppliancesClientListBySubscriptionOptions) *runtime.Pager[AppliancesClientListBySubscriptionResponse] { @@ -416,7 +461,7 @@ func (client *AppliancesClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -431,31 +476,31 @@ func (client *AppliancesClient) listBySubscriptionHandleResponse(resp *http.Resp return result, nil } -// ListClusterCustomerUserCredential - Returns the cluster customer user credentials for the dedicated appliance. +// ListClusterUserCredential - Returns the cluster user credentials for the dedicated appliance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // resourceName - Appliances name. -// options - AppliancesClientListClusterCustomerUserCredentialOptions contains the optional parameters for the AppliancesClient.ListClusterCustomerUserCredential +// options - AppliancesClientListClusterUserCredentialOptions contains the optional parameters for the AppliancesClient.ListClusterUserCredential // method. -func (client *AppliancesClient) ListClusterCustomerUserCredential(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListClusterCustomerUserCredentialOptions) (AppliancesClientListClusterCustomerUserCredentialResponse, error) { - req, err := client.listClusterCustomerUserCredentialCreateRequest(ctx, resourceGroupName, resourceName, options) +func (client *AppliancesClient) ListClusterUserCredential(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListClusterUserCredentialOptions) (AppliancesClientListClusterUserCredentialResponse, error) { + req, err := client.listClusterUserCredentialCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { - return AppliancesClientListClusterCustomerUserCredentialResponse{}, err + return AppliancesClientListClusterUserCredentialResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return AppliancesClientListClusterCustomerUserCredentialResponse{}, err + return AppliancesClientListClusterUserCredentialResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return AppliancesClientListClusterCustomerUserCredentialResponse{}, runtime.NewResponseError(resp) + return AppliancesClientListClusterUserCredentialResponse{}, runtime.NewResponseError(resp) } - return client.listClusterCustomerUserCredentialHandleResponse(resp) + return client.listClusterUserCredentialHandleResponse(resp) } -// listClusterCustomerUserCredentialCreateRequest creates the ListClusterCustomerUserCredential request. -func (client *AppliancesClient) listClusterCustomerUserCredentialCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListClusterCustomerUserCredentialOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterCustomerUserCredential" +// listClusterUserCredentialCreateRequest creates the ListClusterUserCredential request. +func (client *AppliancesClient) listClusterUserCredentialCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListClusterUserCredentialOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -473,46 +518,45 @@ func (client *AppliancesClient) listClusterCustomerUserCredentialCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// listClusterCustomerUserCredentialHandleResponse handles the ListClusterCustomerUserCredential response. -func (client *AppliancesClient) listClusterCustomerUserCredentialHandleResponse(resp *http.Response) (AppliancesClientListClusterCustomerUserCredentialResponse, error) { - result := AppliancesClientListClusterCustomerUserCredentialResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplianceListClusterCustomerUserCredentialResults); err != nil { - return AppliancesClientListClusterCustomerUserCredentialResponse{}, err +// listClusterUserCredentialHandleResponse handles the ListClusterUserCredential response. +func (client *AppliancesClient) listClusterUserCredentialHandleResponse(resp *http.Response) (AppliancesClientListClusterUserCredentialResponse, error) { + result := AppliancesClientListClusterUserCredentialResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplianceListCredentialResults); err != nil { + return AppliancesClientListClusterUserCredentialResponse{}, err } return result, nil } -// ListClusterUserCredential - Returns the cluster user credentials for the dedicated appliance. +// ListKeys - Returns the cluster customer credentials for the dedicated appliance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // resourceName - Appliances name. -// options - AppliancesClientListClusterUserCredentialOptions contains the optional parameters for the AppliancesClient.ListClusterUserCredential -// method. -func (client *AppliancesClient) ListClusterUserCredential(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListClusterUserCredentialOptions) (AppliancesClientListClusterUserCredentialResponse, error) { - req, err := client.listClusterUserCredentialCreateRequest(ctx, resourceGroupName, resourceName, options) +// options - AppliancesClientListKeysOptions contains the optional parameters for the AppliancesClient.ListKeys method. +func (client *AppliancesClient) ListKeys(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListKeysOptions) (AppliancesClientListKeysResponse, error) { + req, err := client.listKeysCreateRequest(ctx, resourceGroupName, resourceName, options) if err != nil { - return AppliancesClientListClusterUserCredentialResponse{}, err + return AppliancesClientListKeysResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return AppliancesClientListClusterUserCredentialResponse{}, err + return AppliancesClientListKeysResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return AppliancesClientListClusterUserCredentialResponse{}, runtime.NewResponseError(resp) + return AppliancesClientListKeysResponse{}, runtime.NewResponseError(resp) } - return client.listClusterUserCredentialHandleResponse(resp) + return client.listKeysHandleResponse(resp) } -// listClusterUserCredentialCreateRequest creates the ListClusterUserCredential request. -func (client *AppliancesClient) listClusterUserCredentialCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListClusterUserCredentialOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential" +// listKeysCreateRequest creates the ListKeys request. +func (client *AppliancesClient) listKeysCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *AppliancesClientListKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listkeys" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } @@ -530,24 +574,23 @@ func (client *AppliancesClient) listClusterUserCredentialCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// listClusterUserCredentialHandleResponse handles the ListClusterUserCredential response. -func (client *AppliancesClient) listClusterUserCredentialHandleResponse(resp *http.Response) (AppliancesClientListClusterUserCredentialResponse, error) { - result := AppliancesClientListClusterUserCredentialResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplianceListCredentialResults); err != nil { - return AppliancesClientListClusterUserCredentialResponse{}, err +// listKeysHandleResponse handles the ListKeys response. +func (client *AppliancesClient) listKeysHandleResponse(resp *http.Response) (AppliancesClientListKeysResponse, error) { + result := AppliancesClientListKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplianceListKeysResults); err != nil { + return AppliancesClientListKeysResponse{}, err } return result, nil } // NewListOperationsPager - Lists all available Appliances operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // options - AppliancesClientListOperationsOptions contains the optional parameters for the AppliancesClient.ListOperations // method. func (client *AppliancesClient) NewListOperationsPager(options *AppliancesClientListOperationsOptions) *runtime.Pager[AppliancesClientListOperationsResponse] { @@ -586,7 +629,7 @@ func (client *AppliancesClient) listOperationsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -603,7 +646,7 @@ func (client *AppliancesClient) listOperationsHandleResponse(resp *http.Response // Update - Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-15-preview +// Generated from API version 2022-10-27 // resourceGroupName - The name of the resource group. The name is case insensitive. // resourceName - Appliances name. // parameters - The updatable fields of an existing Appliance. @@ -643,7 +686,7 @@ func (client *AppliancesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-15-preview") + reqQP.Set("api-version", "2022-10-27") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/appliances_client_example_test.go b/sdk/resourcemanager/resourceconnector/armresourceconnector/appliances_client_example_test.go deleted file mode 100644 index 17996c3c16fd..000000000000 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/appliances_client_example_test.go +++ /dev/null @@ -1,266 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armresourceconnector_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/resourceconnector/armresourceconnector" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListOperations.json -func ExampleAppliancesClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListBySubscription.json -func ExampleAppliancesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListByResourceGroup.json -func ExampleAppliancesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("testresourcegroup", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesGet.json -func ExampleAppliancesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testresourcegroup", - "appliance01", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesCreate_Update.json -func ExampleAppliancesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testresourcegroup", - "appliance01", - armresourceconnector.Appliance{ - Location: to.Ptr("West US"), - Properties: &armresourceconnector.ApplianceProperties{ - Distro: to.Ptr(armresourceconnector.DistroAKSEdge), - InfrastructureConfig: &armresourceconnector.AppliancePropertiesInfrastructureConfig{ - Provider: to.Ptr(armresourceconnector.ProviderVMWare), - }, - }, - }, - 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) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesDelete.json -func ExampleAppliancesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testresourcegroup", - "appliance01", - 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/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesPatch.json -func ExampleAppliancesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "testresourcegroup", - "appliance01", - armresourceconnector.PatchableAppliance{ - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterCustomerUserCredential.json -func ExampleAppliancesClient_ListClusterCustomerUserCredential() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListClusterCustomerUserCredential(ctx, - "testresourcegroup", - "appliance01", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/AppliancesListClusterUserCredential.json -func ExampleAppliancesClient_ListClusterUserCredential() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListClusterUserCredential(ctx, - "testresourcegroup", - "appliance01", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/preview/2022-04-15-preview/examples/UpgradeGraph.json -func ExampleAppliancesClient_GetUpgradeGraph() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armresourceconnector.NewAppliancesClient("11111111-2222-3333-4444-555555555555", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetUpgradeGraph(ctx, - "testresourcegroup", - "appliance01", - "stable", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/autorest.md b/sdk/resourcemanager/resourceconnector/armresourceconnector/autorest.md index df6bfc6800b1..3b95c47ef2c8 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/autorest.md +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/a7de71ef99f5ea2aefe38bbd3c55db09c64547e8/specification/resourceconnector/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/a7de71ef99f5ea2aefe38bbd3c55db09c64547e8/specification/resourceconnector/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resourceconnector/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resourceconnector/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.2.0 +module-version: 1.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/constants.go b/sdk/resourcemanager/resourceconnector/armresourceconnector/constants.go index 28293e2faaaa..93c3118f62c4 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/constants.go +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/constants.go @@ -11,7 +11,7 @@ package armresourceconnector const ( moduleName = "armresourceconnector" - moduleVersion = "v0.2.0" + moduleVersion = "v1.0.0" ) // AccessProfileType - Name which contains the role of the kubeconfig. @@ -30,6 +30,20 @@ func PossibleAccessProfileTypeValues() []AccessProfileType { } } +// ArtifactType - Appliance ArtifactType definition. +type ArtifactType string + +const ( + ArtifactTypeLogsArtifactType ArtifactType = "LogsArtifactType" +) + +// PossibleArtifactTypeValues returns the possible values for the ArtifactType const type. +func PossibleArtifactTypeValues() []ArtifactType { + return []ArtifactType{ + ArtifactTypeLogsArtifactType, + } +} + // CreatedByType - The type of identity that created the resource. type CreatedByType string @@ -106,13 +120,19 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { type SSHKeyType string const ( + SSHKeyTypeLogsKey SSHKeyType = "LogsKey" + SSHKeyTypeManagementCAKey SSHKeyType = "ManagementCAKey" SSHKeyTypeSSHCustomerUser SSHKeyType = "SSHCustomerUser" + SSHKeyTypeScopedAccessKey SSHKeyType = "ScopedAccessKey" ) // PossibleSSHKeyTypeValues returns the possible values for the SSHKeyType const type. func PossibleSSHKeyTypeValues() []SSHKeyType { return []SSHKeyType{ + SSHKeyTypeLogsKey, + SSHKeyTypeManagementCAKey, SSHKeyTypeSSHCustomerUser, + SSHKeyTypeScopedAccessKey, } } @@ -122,6 +142,13 @@ type Status string const ( StatusConnected Status = "Connected" StatusConnecting Status = "Connecting" + StatusImageDeprovisioning Status = "ImageDeprovisioning" + StatusImageDownloaded Status = "ImageDownloaded" + StatusImageDownloading Status = "ImageDownloading" + StatusImagePending Status = "ImagePending" + StatusImageProvisioned Status = "ImageProvisioned" + StatusImageProvisioning Status = "ImageProvisioning" + StatusImageUnknown Status = "ImageUnknown" StatusNone Status = "None" StatusOffline Status = "Offline" StatusPostUpgrade Status = "PostUpgrade" @@ -135,9 +162,11 @@ const ( StatusUpgradeComplete Status = "UpgradeComplete" StatusUpgradeFailed Status = "UpgradeFailed" StatusUpgradePrerequisitesCompleted Status = "UpgradePrerequisitesCompleted" + StatusUpgradingKVAIO Status = "UpgradingKVAIO" StatusValidating Status = "Validating" StatusWaitingForCloudOperator Status = "WaitingForCloudOperator" StatusWaitingForHeartbeat Status = "WaitingForHeartbeat" + StatusWaitingForKVAIO Status = "WaitingForKVAIO" ) // PossibleStatusValues returns the possible values for the Status const type. @@ -145,6 +174,13 @@ func PossibleStatusValues() []Status { return []Status{ StatusConnected, StatusConnecting, + StatusImageDeprovisioning, + StatusImageDownloaded, + StatusImageDownloading, + StatusImagePending, + StatusImageProvisioned, + StatusImageProvisioning, + StatusImageUnknown, StatusNone, StatusOffline, StatusPostUpgrade, @@ -158,8 +194,10 @@ func PossibleStatusValues() []Status { StatusUpgradeComplete, StatusUpgradeFailed, StatusUpgradePrerequisitesCompleted, + StatusUpgradingKVAIO, StatusValidating, StatusWaitingForCloudOperator, StatusWaitingForHeartbeat, + StatusWaitingForKVAIO, } } diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/go.mod b/sdk/resourcemanager/resourceconnector/armresourceconnector/go.mod index f9d6d73463b6..6129d65675c5 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/go.mod +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourceconnector/a go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/go.sum b/sdk/resourcemanager/resourceconnector/armresourceconnector/go.sum index 8828b17b1853..3afb578030a5 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/go.sum +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/go.sum @@ -1,33 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE= -github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= 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 v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/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/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +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.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +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/resourceconnector/armresourceconnector/models.go b/sdk/resourcemanager/resourceconnector/armresourceconnector/models.go index efff732a8ecf..88009afc2401 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/models.go +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/models.go @@ -31,7 +31,7 @@ type Appliance struct { // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` - // READ-ONLY; Metadata pertaining to creation and last modification of the resource + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" @@ -47,13 +47,10 @@ type ApplianceCredentialKubeconfig struct { Value *string `json:"value,omitempty" azure:"ro"` } -// ApplianceListClusterCustomerUserCredentialResults - The List Cluster Customer User Credential Results appliance. -type ApplianceListClusterCustomerUserCredentialResults struct { - // READ-ONLY; The list of appliance kubeconfigs. - Kubeconfigs []*ApplianceCredentialKubeconfig `json:"kubeconfigs,omitempty" azure:"ro"` - - // READ-ONLY; Map of Customer User Public and Private SSH Keys - SSHKeys map[string]*SSHKey `json:"sshKeys,omitempty" azure:"ro"` +// ApplianceGetTelemetryConfigResult - The Get Telemetry Config Result appliance. +type ApplianceGetTelemetryConfigResult struct { + // READ-ONLY; Telemetry instrumentation key. + TelemetryInstrumentationKey *string `json:"telemetryInstrumentationKey,omitempty" azure:"ro"` } // ApplianceListCredentialResults - The List Cluster User Credential appliance. @@ -65,6 +62,18 @@ type ApplianceListCredentialResults struct { Kubeconfigs []*ApplianceCredentialKubeconfig `json:"kubeconfigs,omitempty" azure:"ro"` } +// ApplianceListKeysResults - The List Cluster Keys Results appliance. +type ApplianceListKeysResults struct { + // READ-ONLY; Map of artifacts that contains a list of ArtifactProfile used to upload artifacts such as logs. + ArtifactProfiles map[string]*ArtifactProfile `json:"artifactProfiles,omitempty" azure:"ro"` + + // READ-ONLY; The list of appliance kubeconfigs. + Kubeconfigs []*ApplianceCredentialKubeconfig `json:"kubeconfigs,omitempty" azure:"ro"` + + // READ-ONLY; Map of Customer User Public, Private SSH Keys and Certificate when available. + SSHKeys map[string]*SSHKey `json:"sshKeys,omitempty" azure:"ro"` +} + // ApplianceListResult - The List Appliances operation response. type ApplianceListResult struct { // READ-ONLY; The URL to use for getting the next set of results. @@ -121,7 +130,7 @@ type ApplianceProperties struct { // Contains infrastructure information about the Appliance InfrastructureConfig *AppliancePropertiesInfrastructureConfig `json:"infrastructureConfig,omitempty"` - // Certificates pair used to download MSI certificate from HIS + // Certificates pair used to download MSI certificate from HIS. Can only be set once. PublicKey *string `json:"publicKey,omitempty"` // Version of the Appliance @@ -158,6 +167,12 @@ type AppliancesClientGetOptions struct { // placeholder for future optional parameters } +// AppliancesClientGetTelemetryConfigOptions contains the optional parameters for the AppliancesClient.GetTelemetryConfig +// method. +type AppliancesClientGetTelemetryConfigOptions struct { + // placeholder for future optional parameters +} + // AppliancesClientGetUpgradeGraphOptions contains the optional parameters for the AppliancesClient.GetUpgradeGraph method. type AppliancesClientGetUpgradeGraphOptions struct { // placeholder for future optional parameters @@ -175,15 +190,14 @@ type AppliancesClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// AppliancesClientListClusterCustomerUserCredentialOptions contains the optional parameters for the AppliancesClient.ListClusterCustomerUserCredential +// AppliancesClientListClusterUserCredentialOptions contains the optional parameters for the AppliancesClient.ListClusterUserCredential // method. -type AppliancesClientListClusterCustomerUserCredentialOptions struct { +type AppliancesClientListClusterUserCredentialOptions struct { // placeholder for future optional parameters } -// AppliancesClientListClusterUserCredentialOptions contains the optional parameters for the AppliancesClient.ListClusterUserCredential -// method. -type AppliancesClientListClusterUserCredentialOptions struct { +// AppliancesClientListKeysOptions contains the optional parameters for the AppliancesClient.ListKeys method. +type AppliancesClientListKeysOptions struct { // placeholder for future optional parameters } @@ -197,6 +211,12 @@ type AppliancesClientUpdateOptions struct { // placeholder for future optional parameters } +// ArtifactProfile - Appliance ArtifactProfile definition. +type ArtifactProfile struct { + // READ-ONLY; Endpoint is the URL to upload artifacts to. + Endpoint *string `json:"endpoint,omitempty" azure:"ro"` +} + // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. @@ -272,17 +292,29 @@ type Resource struct { // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` } // SSHKey - Appliance SSHKey definition. type SSHKey struct { - // User Private Key. - PrivateKey *string `json:"privateKey,omitempty"` + // READ-ONLY; Certificate associated with the public key if the key is signed. + Certificate *string `json:"certificate,omitempty" azure:"ro"` - // User Public Key. - PublicKey *string `json:"publicKey,omitempty"` + // READ-ONLY; Certificate creation timestamp (Unix). + CreationTimeStamp *int64 `json:"creationTimeStamp,omitempty" azure:"ro"` + + // READ-ONLY; Certificate expiration timestamp (Unix). + ExpirationTimeStamp *int64 `json:"expirationTimeStamp,omitempty" azure:"ro"` + + // READ-ONLY; Private Key. + PrivateKey *string `json:"privateKey,omitempty" azure:"ro"` + + // READ-ONLY; Public Key. + PublicKey *string `json:"publicKey,omitempty" azure:"ro"` } // SupportedVersion - The SupportedVersion object for appliance. @@ -363,6 +395,9 @@ type TrackedResource struct { // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` } diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/models_serde.go b/sdk/resourcemanager/resourceconnector/armresourceconnector/models_serde.go index 56da93755783..3ee7bb680562 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/models_serde.go +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/models_serde.go @@ -102,16 +102,15 @@ func (a *ApplianceCredentialKubeconfig) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ApplianceListClusterCustomerUserCredentialResults. -func (a ApplianceListClusterCustomerUserCredentialResults) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ApplianceGetTelemetryConfigResult. +func (a ApplianceGetTelemetryConfigResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "kubeconfigs", a.Kubeconfigs) - populate(objectMap, "sshKeys", a.SSHKeys) + populate(objectMap, "telemetryInstrumentationKey", a.TelemetryInstrumentationKey) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceListClusterCustomerUserCredentialResults. -func (a *ApplianceListClusterCustomerUserCredentialResults) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceGetTelemetryConfigResult. +func (a *ApplianceGetTelemetryConfigResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -119,11 +118,8 @@ func (a *ApplianceListClusterCustomerUserCredentialResults) UnmarshalJSON(data [ for key, val := range rawMsg { var err error switch key { - case "kubeconfigs": - err = unpopulate(val, "Kubeconfigs", &a.Kubeconfigs) - delete(rawMsg, key) - case "sshKeys": - err = unpopulate(val, "SSHKeys", &a.SSHKeys) + case "telemetryInstrumentationKey": + err = unpopulate(val, "TelemetryInstrumentationKey", &a.TelemetryInstrumentationKey) delete(rawMsg, key) } if err != nil { @@ -164,6 +160,41 @@ func (a *ApplianceListCredentialResults) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ApplianceListKeysResults. +func (a ApplianceListKeysResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "artifactProfiles", a.ArtifactProfiles) + populate(objectMap, "kubeconfigs", a.Kubeconfigs) + populate(objectMap, "sshKeys", a.SSHKeys) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceListKeysResults. +func (a *ApplianceListKeysResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "artifactProfiles": + err = unpopulate(val, "ArtifactProfiles", &a.ArtifactProfiles) + delete(rawMsg, key) + case "kubeconfigs": + err = unpopulate(val, "Kubeconfigs", &a.Kubeconfigs) + delete(rawMsg, key) + case "sshKeys": + err = unpopulate(val, "SSHKeys", &a.SSHKeys) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ApplianceListResult. func (a ApplianceListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -378,6 +409,33 @@ func (a *AppliancePropertiesInfrastructureConfig) UnmarshalJSON(data []byte) err return nil } +// MarshalJSON implements the json.Marshaller interface for type ArtifactProfile. +func (a ArtifactProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endpoint", a.Endpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArtifactProfile. +func (a *ArtifactProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpoint": + err = unpopulate(val, "Endpoint", &a.Endpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -585,6 +643,7 @@ func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) + populate(objectMap, "systemData", r.SystemData) populate(objectMap, "type", r.Type) return json.Marshal(objectMap) } @@ -604,6 +663,9 @@ func (r *Resource) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &r.Type) delete(rawMsg, key) @@ -618,6 +680,9 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SSHKey. func (s SSHKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + populate(objectMap, "certificate", s.Certificate) + populate(objectMap, "creationTimeStamp", s.CreationTimeStamp) + populate(objectMap, "expirationTimeStamp", s.ExpirationTimeStamp) populate(objectMap, "privateKey", s.PrivateKey) populate(objectMap, "publicKey", s.PublicKey) return json.Marshal(objectMap) @@ -632,6 +697,15 @@ func (s *SSHKey) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "certificate": + err = unpopulate(val, "Certificate", &s.Certificate) + delete(rawMsg, key) + case "creationTimeStamp": + err = unpopulate(val, "CreationTimeStamp", &s.CreationTimeStamp) + delete(rawMsg, key) + case "expirationTimeStamp": + err = unpopulate(val, "ExpirationTimeStamp", &s.ExpirationTimeStamp) + delete(rawMsg, key) case "privateKey": err = unpopulate(val, "PrivateKey", &s.PrivateKey) delete(rawMsg, key) @@ -831,6 +905,7 @@ func (t TrackedResource) MarshalJSON() ([]byte, error) { populate(objectMap, "id", t.ID) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) + populate(objectMap, "systemData", t.SystemData) populate(objectMap, "tags", t.Tags) populate(objectMap, "type", t.Type) return json.Marshal(objectMap) @@ -854,6 +929,9 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { case "name": err = unpopulate(val, "Name", &t.Name) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &t.SystemData) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &t.Tags) delete(rawMsg, key) diff --git a/sdk/resourcemanager/resourceconnector/armresourceconnector/response_types.go b/sdk/resourcemanager/resourceconnector/armresourceconnector/response_types.go index 6ccca8895c76..daf0b8841be2 100644 --- a/sdk/resourcemanager/resourceconnector/armresourceconnector/response_types.go +++ b/sdk/resourcemanager/resourceconnector/armresourceconnector/response_types.go @@ -24,6 +24,11 @@ type AppliancesClientGetResponse struct { Appliance } +// AppliancesClientGetTelemetryConfigResponse contains the response from method AppliancesClient.GetTelemetryConfig. +type AppliancesClientGetTelemetryConfigResponse struct { + ApplianceGetTelemetryConfigResult +} + // AppliancesClientGetUpgradeGraphResponse contains the response from method AppliancesClient.GetUpgradeGraph. type AppliancesClientGetUpgradeGraphResponse struct { UpgradeGraph @@ -39,16 +44,16 @@ type AppliancesClientListBySubscriptionResponse struct { ApplianceListResult } -// AppliancesClientListClusterCustomerUserCredentialResponse contains the response from method AppliancesClient.ListClusterCustomerUserCredential. -type AppliancesClientListClusterCustomerUserCredentialResponse struct { - ApplianceListClusterCustomerUserCredentialResults -} - // AppliancesClientListClusterUserCredentialResponse contains the response from method AppliancesClient.ListClusterUserCredential. type AppliancesClientListClusterUserCredentialResponse struct { ApplianceListCredentialResults } +// AppliancesClientListKeysResponse contains the response from method AppliancesClient.ListKeys. +type AppliancesClientListKeysResponse struct { + ApplianceListKeysResults +} + // AppliancesClientListOperationsResponse contains the response from method AppliancesClient.ListOperations. type AppliancesClientListOperationsResponse struct { ApplianceOperationsList