From c751630e4a062d8e18d99f603bcfacbb9ca23b17 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 17 Sep 2021 06:39:34 +0000 Subject: [PATCH] CodeGen from PR 15593 in Azure/azure-rest-api-specs Merge 771e60ffcf8edd428c39a507f0b9842045c142ae into f7bdc95b45115dd1d5d7aec82d1b88ea17a938a7 --- .../arm-kubernetesconfiguration/README.md | 20 +- .../arm-kubernetesconfiguration/package.json | 2 +- .../src/models/extensionsMappers.ts | 34 + .../src/models/index.ts | 675 ++++++++++++++--- .../src/models/mappers.ts | 694 ++++++++++++++++-- ...nsMappers.ts => operationStatusMappers.ts} | 15 +- .../src/models/operationsMappers.ts | 3 +- .../src/models/parameters.ts | 44 +- ...ControlConfigurations.ts => extensions.ts} | 312 +++++--- .../src/operations/index.ts | 3 +- .../src/operations/operationStatus.ts | 249 +++++++ .../src/operations/operations.ts | 6 +- .../src/sourceControlConfigurationClient.ts | 9 +- ...sourceControlConfigurationClientContext.ts | 9 +- 14 files changed, 1732 insertions(+), 343 deletions(-) create mode 100644 sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/extensionsMappers.ts rename sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/{sourceControlConfigurationsMappers.ts => operationStatusMappers.ts} (55%) rename sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/{sourceControlConfigurations.ts => extensions.ts} (55%) create mode 100644 sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md index e7579c259462..f07d1b566468 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md @@ -1,11 +1,11 @@ ## Azure SourceControlConfigurationClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for SourceControlConfigurationClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for SourceControlConfigurationClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-kubernetesconfiguration @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and get sourceControlConfigurations as an example written in JavaScript. +#### nodejs - Authentication, client creation, and get extensions as an example written in JavaScript. ##### Sample code @@ -55,8 +53,8 @@ const resourceGroupName = "testresourceGroupName"; const clusterRp = "Microsoft.ContainerService"; const clusterResourceName = "managedClusters"; const clusterName = "testclusterName"; -const sourceControlConfigurationName = "testsourceControlConfigurationName"; -client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName).then((result) => { +const extensionName = "testextensionName"; +client.extensions.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -65,7 +63,7 @@ client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterReso }); ``` -#### browser - Authentication, client creation, and get sourceControlConfigurations as an example written in JavaScript. +#### browser - Authentication, client creation, and get extensions as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -90,15 +88,15 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmKubernetesconfiguration.SourceControlConfigurationClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const clusterRp = "Microsoft.ContainerService"; const clusterResourceName = "managedClusters"; const clusterName = "testclusterName"; - const sourceControlConfigurationName = "testsourceControlConfigurationName"; - client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName).then((result) => { + const extensionName = "testextensionName"; + client.extensions.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json index 00a0f032cfd4..04d76826fab0 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/kubernetesconfiguration/arm-kubernetesconfiguration", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/kubernetesconfiguration/arm-kubernetesconfiguration", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/extensionsMappers.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/extensionsMappers.ts new file mode 100644 index 000000000000..cd47d5431501 --- /dev/null +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/extensionsMappers.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Extension, + ExtensionPropertiesAksAssignedIdentity, + ExtensionsList, + ExtensionStatus, + Identity, + PatchExtension, + Plan, + ProxyResource, + Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + Scope, + ScopeCluster, + ScopeNamespace, + Sku, + SystemData, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts index a073fedae0ab..e12bd51fd9d2 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts @@ -12,75 +12,147 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Sample result definition + * Specifies that the scope of the extension is Cluster */ -export interface Result { +export interface ScopeCluster { /** - * Sample property of type string + * Namespace where the extension Release must be placed, for a Cluster scoped extension. If this + * namespace does not exist, it will be created */ - sampleProperty?: string; + releaseNamespace?: string; } /** - * Error definition. + * Specifies that the scope of the extension is Namespace */ -export interface ErrorDefinition { +export interface ScopeNamespace { /** - * Service specific error code which serves as the substatus for the HTTP error code. + * Namespace where the extension will be created for an Namespace scoped extension. If this + * namespace does not exist, it will be created */ - code: string; + targetNamespace?: string; +} + +/** + * Scope of the extension. It can be either Cluster or Namespace; but not both. + */ +export interface Scope { + cluster?: ScopeCluster; + namespace?: ScopeNamespace; +} + +/** + * Status from the extension. + */ +export interface ExtensionStatus { + /** + * Status code provided by the Extension + */ + code?: string; + /** + * Short description of status of the extension. + */ + displayStatus?: string; + /** + * Level of the status. Possible values include: 'Error', 'Warning', 'Information'. Default + * value: 'Information'. + */ + level?: LevelType; + /** + * Detailed message of the status from the Extension. + */ + message?: string; /** - * Description of the error. + * DateLiteral (per ISO8601) noting the time of installation status. */ - message: string; + time?: string; } /** - * Error response. + * The resource management error additional info. */ -export interface ErrorResponse { +export interface ErrorAdditionalInfo { /** - * Error definition. + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - error?: ErrorDefinition; + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; } /** - * Compliance Status details + * The error detail. */ -export interface ComplianceStatus { +export interface ErrorDetail { /** - * The compliance state of the configuration. Possible values include: 'Pending', 'Compliant', - * 'Noncompliant', 'Installed', 'Failed' + * The error code. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly complianceState?: ComplianceStateType; + readonly code?: string; /** - * Datetime the configuration was last applied. + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - lastConfigApplied?: Date; + readonly message?: string; /** - * Message from when the configuration was applied. + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - message?: string; + readonly target?: string; /** - * Level of the message. Possible values include: 'Error', 'Warning', 'Information' + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - messageLevel?: MessageLevelType; + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** - * Properties for Helm operator. + * Identity of the Extension resource in an AKS cluster */ -export interface HelmOperatorProperties { +export interface ExtensionPropertiesAksAssignedIdentity { /** - * Version of the operator Helm chart. + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - chartVersion?: string; + readonly principalId?: string; /** - * Values override for the operator Helm chart. + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - chartValues?: string; + readonly tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned' + */ + type?: ResourceIdentityType; +} + +/** + * Identity for the resource. + */ +export interface Identity { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned' + */ + type?: ResourceIdentityType; } /** @@ -110,7 +182,7 @@ export interface SystemData { */ lastModifiedByType?: CreatedByType; /** - * The type of identity that last modified the resource. + * The timestamp of resource last modification (UTC) */ lastModifiedAt?: Date; } @@ -148,69 +220,68 @@ export interface ProxyResource extends Resource { } /** - * The SourceControl Configuration object returned in Get & Put response. + * The Extension object. */ -export interface SourceControlConfiguration extends ProxyResource { +export interface Extension extends ProxyResource { /** - * Url of the SourceControl Repository. + * Type of the Extension, of which this resource is an instance of. It must be one of the + * Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. */ - repositoryUrl?: string; + extensionType?: string; /** - * The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric - * characters, hyphen and period only. Default value: 'default'. + * Flag to note if this extension participates in auto upgrade of minor version, or not. Default + * value: true. */ - operatorNamespace?: string; + autoUpgradeMinorVersion?: boolean; /** - * Instance name of the operator - identifying the specific configuration. + * ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - + * only if autoUpgradeMinorVersion is 'true'. Default value: 'Stable'. */ - operatorInstanceName?: string; + releaseTrain?: string; /** - * Type of the operator. Possible values include: 'Flux' + * Version of the extension for this extension, if it is 'pinned' to a specific version. + * autoUpgradeMinorVersion must be 'false'. */ - operatorType?: OperatorType; + version?: string; /** - * Any Parameters for the Operator instance in string format. + * Scope at which the extension is installed. */ - operatorParams?: string; + scope?: Scope; /** - * Name-value pairs of protected configuration settings for the configuration + * Configuration settings, as name-value pairs for configuring this extension. */ - configurationProtectedSettings?: { [propertyName: string]: string }; + configurationSettings?: { [propertyName: string]: string }; /** - * Scope at which the operator will be installed. Possible values include: 'cluster', - * 'namespace'. Default value: 'cluster'. + * Configuration settings that are sensitive, as name-value pairs for configuring this extension. */ - operatorScope?: OperatorScopeType; + configurationProtectedSettings?: { [propertyName: string]: string }; /** - * Public Key associated with this SourceControl configuration (either generated within the - * cluster or provided by the user). - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Creating', 'Updating', 'Deleting' */ - readonly repositoryPublicKey?: string; + provisioningState?: ProvisioningState; /** - * Base64-encoded known_hosts contents containing public SSH keys required to access private Git - * instances + * Status from this extension. */ - sshKnownHostsContents?: string; + statuses?: ExtensionStatus[]; + errorInfo?: ErrorDetail; /** - * Option to enable Helm Operator for this git configuration. + * Custom Location settings properties. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enableHelmOperator?: boolean; + readonly customLocationSettings?: { [propertyName: string]: string }; /** - * Properties for Helm operator. + * Uri of the Helm package + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - helmOperatorProperties?: HelmOperatorProperties; + readonly packageUri?: string; /** - * The provisioning state of the resource provider. Possible values include: 'Accepted', - * 'Deleting', 'Running', 'Succeeded', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Identity of the Extension resource in an AKS cluster */ - readonly provisioningState?: ProvisioningStateType; + aksAssignedIdentity?: ExtensionPropertiesAksAssignedIdentity; /** - * Compliance Status of the Configuration - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Identity of the Extension resource */ - readonly complianceStatus?: ComplianceStatus; + identity?: Identity; /** * Top level metadata * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources @@ -257,6 +328,63 @@ export interface ResourceProviderOperation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isDataAction?: boolean; + /** + * Origin of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly origin?: string; +} + +/** + * The current status of an async operation. + */ +export interface OperationStatusResult { + /** + * Fully qualified ID for the async operation. + */ + id?: string; + /** + * Name of the async operation. + */ + name?: string; + /** + * Operation status. + */ + status: string; + /** + * Additional information, if available. + */ + properties?: { [propertyName: string]: string }; + error?: ErrorDetail; +} + +/** + * The Extension Patch Request object. + */ +export interface PatchExtension { + /** + * Flag to note if this extension participates in auto upgrade of minor version, or not. Default + * value: true. + */ + autoUpgradeMinorVersion?: boolean; + /** + * ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - + * only if autoUpgradeMinorVersion is 'true'. Default value: 'Stable'. + */ + releaseTrain?: string; + /** + * Version of the extension for this extension, if it is 'pinned' to a specific version. + * autoUpgradeMinorVersion must be 'false'. + */ + version?: string; + /** + * Configuration settings, as name-value pairs for configuring this extension. + */ + configurationSettings?: { [propertyName: string]: string }; + /** + * Configuration settings that are sensitive, as name-value pairs for configuring this extension. + */ + configurationProtectedSettings?: { [propertyName: string]: string }; } /** @@ -287,6 +415,172 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +/** + * An interface representing ResourceModelWithAllowedPropertySetIdentity. + */ +export interface ResourceModelWithAllowedPropertySetIdentity extends Identity { +} + +/** + * The resource model definition representing SKU + */ +export interface Sku { + /** + * The name of the SKU. Ex - P3. It is typically a letter+number code + */ + name: string; + /** + * This field is required to be implemented by the Resource Provider if the service has more than + * one tier, but is not required on a PUT. Possible values include: 'Free', 'Basic', 'Standard', + * 'Premium' + */ + tier?: SkuTier; + /** + * The SKU size. When the name field is the combination of tier and some other value, this would + * be the standalone code. + */ + size?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + */ + family?: string; + /** + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in + * is not possible for the resource this may be omitted. + */ + capacity?: number; +} + +/** + * An interface representing ResourceModelWithAllowedPropertySetSku. + */ +export interface ResourceModelWithAllowedPropertySetSku extends Sku { +} + +/** + * Plan for the resource. + */ +export interface Plan { + /** + * A user defined name of the 3rd Party Artifact that is being procured. + */ + name: string; + /** + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + */ + publisher: string; + /** + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID + * specified for the artifact at the time of Data Market onboarding. + */ + product: string; + /** + * A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + */ + promotionCode?: string; + /** + * The version of the desired product/artifact. + */ + version?: string; +} + +/** + * An interface representing ResourceModelWithAllowedPropertySetPlan. + */ +export interface ResourceModelWithAllowedPropertySetPlan extends Plan { +} + +/** + * The resource model definition containing the full set of allowed properties for a resource. + * Except properties bag, there cannot be a top level property outside of this set. + */ +export interface ResourceModelWithAllowedPropertySet extends BaseResource { + /** + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The geo-location where the resource lives + */ + location?: string; + /** + * The fully qualified resource ID of the resource that manages this resource. Indicates if this + * resource is managed by another Azure resource. If this is present, complete mode deployment + * will not delete the resource if it is removed from the template since it is managed by another + * resource. + */ + managedBy?: string; + /** + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource + * provider must validate and persist this value. + */ + kind?: string; + /** + * The etag field is *not* required. If it is provided in the response body, it must also be + * provided as a header per the normal etag convention. Entity tags are used for comparing two + * or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag + * (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + * (section 14.27) header fields. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + identity?: ResourceModelWithAllowedPropertySetIdentity; + sku?: ResourceModelWithAllowedPropertySetSku; + plan?: ResourceModelWithAllowedPropertySetPlan; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorDetail; +} + +/** + * Optional Parameters. + */ +export interface ExtensionsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Delete the extension resource in Azure - not the normal asynchronous delete. + */ + forceDelete?: boolean; +} + +/** + * Optional Parameters. + */ +export interface ExtensionsBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Delete the extension resource in Azure - not the normal asynchronous delete. + */ + forceDelete?: boolean; +} + /** * An interface representing SourceControlConfigurationClientOptions. */ @@ -296,13 +590,26 @@ export interface SourceControlConfigurationClientOptions extends AzureServiceCli /** * @interface - * Result of the request to list Source Control Configurations. It contains a list of - * SourceControlConfiguration objects and a URL link to get the next set of results. - * @extends Array + * Result of the request to list Extensions. It contains a list of Extension objects and a URL + * link to get the next set of results. + * @extends Array + */ +export interface ExtensionsList extends Array { + /** + * URL to get the next set of extension objects, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The async operations in progress, in the cluster. + * @extends Array */ -export interface SourceControlConfigurationList extends Array { +export interface OperationStatusList extends Array { /** - * URL to get the next set of configuration objects, if any. + * URL to get the next set of Operation Result objects, if any. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; @@ -322,52 +629,44 @@ export interface ResourceProviderOperationList extends Array + * @returns Promise */ - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase): Promise; + create(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, extensionName: string, extension: Models.Extension, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,clusterRp,clusterResourceName,clusterName,extensionName,extension,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets Kubernetes Cluster Extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: + * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for + * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: + * 'managedClusters', 'connectedClusters' + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, extensionName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -50,12 +70,12 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. + * @param extensionName Name of the Extension. * @param callback The callback */ - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, extensionName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -63,28 +83,29 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. + * @param extensionName Name of the Extension. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, extensionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, extensionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, clusterRp, clusterResourceName, clusterName, - sourceControlConfigurationName, + extensionName, options }, getOperationSpec, - callback) as Promise; + callback) as Promise; } /** - * Create a new Kubernetes Source Control Configuration. - * @param resourceGroupName The name of the resource group. + * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from + * the cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -92,14 +113,18 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. + * @param extensionName Name of the Extension. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, extensionName: string, options?: Models.ExtensionsDeleteMethodOptionalParams): Promise { + return this.beginDeleteMethod(resourceGroupName,clusterRp,clusterResourceName,clusterName,extensionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** - * @param resourceGroupName The name of the resource group. + * Patch an existing Kubernetes Cluster Extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -107,13 +132,19 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. - * @param callback The callback + * @param extensionName Name of the Extension. + * @param patchExtension Properties to Patch in an existing Extension. + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, extensionName: string, patchExtension: Models.PatchExtension, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,clusterRp,clusterResourceName,clusterName,extensionName,patchExtension,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** - * @param resourceGroupName The name of the resource group. + * List all Extensions in the cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -121,31 +152,12 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - sourceControlConfigurationName, - sourceControlConfiguration, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - + list(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, options?: msRest.RequestOptionsBase): Promise; /** - * This will delete the YAML file used to set up the Source control configuration, thus stopping - * future sync from the source repo. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -153,18 +165,11 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param [options] The optional parameters - * @returns Promise + * @param callback The callback */ - deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,clusterRp,clusterResourceName,clusterName,sourceControlConfigurationName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - + list(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, callback: msRest.ServiceCallback): void; /** - * List all Source Control Configurations. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -172,12 +177,26 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param [options] The optional parameters - * @returns Promise + * @param options The optional parameters + * @param callback The callback */ - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + list(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + options + }, + listOperationSpec, + callback) as Promise; + } + /** - * @param resourceGroupName The name of the resource group. + * Create a new Kubernetes Cluster Extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -185,11 +204,30 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param callback The callback + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an Extension. + * @param [options] The optional parameters + * @returns Promise */ - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, callback: msRest.ServiceCallback): void; + beginCreate(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, extensionName: string, extension: Models.Extension, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + extension, + options + }, + beginCreateOperationSpec, + options); + } + /** - * @param resourceGroupName The name of the resource group. + * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from + * the cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -197,27 +235,27 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param options The optional parameters - * @param callback The callback + * @param extensionName Name of the Extension. + * @param [options] The optional parameters + * @returns Promise */ - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginDeleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, extensionName: string, options?: Models.ExtensionsBeginDeleteMethodOptionalParams): Promise { + return this.client.sendLRORequest( { resourceGroupName, clusterRp, clusterResourceName, clusterName, + extensionName, options }, - listOperationSpec, - callback) as Promise; + beginDeleteMethodOperationSpec, + options); } /** - * This will delete the YAML file used to set up the Source control configuration, thus stopping - * future sync from the source repo. - * @param resourceGroupName The name of the resource group. + * Patch an existing Kubernetes Cluster Extension. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' @@ -225,50 +263,52 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. + * @param extensionName Name of the Extension. + * @param patchExtension Properties to Patch in an existing Extension. * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase): Promise { + beginUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, extensionName: string, patchExtension: Models.PatchExtension, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, clusterRp, clusterResourceName, clusterName, - sourceControlConfigurationName, + extensionName, + patchExtension, options }, - beginDeleteMethodOperationSpec, + beginUpdateOperationSpec, options); } /** - * List all Source Control Configurations. + * List all Extensions in the cluster. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback) as Promise; } } @@ -276,14 +316,41 @@ export class SourceControlConfigurations { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.sourceControlConfigurationName + Parameters.extensionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Extension + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterRp, + Parameters.clusterResourceName, + Parameters.clusterName ], queryParameters: [ Parameters.apiVersion @@ -293,7 +360,7 @@ const getOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.SourceControlConfiguration + bodyMapper: Mappers.ExtensionsList }, default: { bodyMapper: Mappers.ErrorResponse @@ -302,16 +369,16 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.sourceControlConfigurationName + Parameters.extensionName ], queryParameters: [ Parameters.apiVersion @@ -320,18 +387,18 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "sourceControlConfiguration", + parameterPath: "extension", mapper: { - ...Mappers.SourceControlConfiguration, + ...Mappers.Extension, required: true } }, responses: { 200: { - bodyMapper: Mappers.SourceControlConfiguration + bodyMapper: Mappers.Extension }, 201: { - bodyMapper: Mappers.SourceControlConfiguration + bodyMapper: Mappers.Extension }, default: { bodyMapper: Mappers.ErrorResponse @@ -340,26 +407,28 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.clusterRp, Parameters.clusterResourceName, - Parameters.clusterName + Parameters.clusterName, + Parameters.extensionName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.forceDelete ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.SourceControlConfigurationList - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } @@ -367,16 +436,16 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.sourceControlConfigurationName + Parameters.extensionName ], queryParameters: [ Parameters.apiVersion @@ -384,9 +453,20 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "patchExtension", + mapper: { + ...Mappers.PatchExtension, + required: true + } + }, responses: { - 200: {}, - 204: {}, + 202: { + bodyMapper: Mappers.Extension + }, + 409: { + bodyMapper: Mappers.ErrorResponse + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -409,7 +489,7 @@ const listNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.SourceControlConfigurationList + bodyMapper: Mappers.ExtensionsList }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts index 0747a061f3f2..9ab0ee15f7fc 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts @@ -7,5 +7,6 @@ * regenerated. */ -export * from "./sourceControlConfigurations"; +export * from "./extensions"; +export * from "./operationStatus"; export * from "./operations"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts new file mode 100644 index 000000000000..d7213be0e9af --- /dev/null +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts @@ -0,0 +1,249 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationStatusMappers"; +import * as Parameters from "../models/parameters"; +import { SourceControlConfigurationClientContext } from "../sourceControlConfigurationClientContext"; + +/** Class representing a OperationStatus. */ +export class OperationStatus { + private readonly client: SourceControlConfigurationClientContext; + + /** + * Create a OperationStatus. + * @param {SourceControlConfigurationClientContext} client Reference to the service client. + */ + constructor(client: SourceControlConfigurationClientContext) { + this.client = client; + } + + /** + * List Async Operations, currently in progress, in a cluster + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: + * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for + * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: + * 'managedClusters', 'connectedClusters' + * @param clusterName The name of the kubernetes cluster. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: + * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for + * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: + * 'managedClusters', 'connectedClusters' + * @param clusterName The name of the kubernetes cluster. + * @param callback The callback + */ + list(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: + * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for + * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: + * 'managedClusters', 'connectedClusters' + * @param clusterName The name of the kubernetes cluster. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get Async Operation status + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: + * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for + * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: + * 'managedClusters', 'connectedClusters' + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: + * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for + * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: + * 'managedClusters', 'connectedClusters' + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id + * @param callback The callback + */ + get(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + * clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible values include: + * 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for + * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: + * 'managedClusters', 'connectedClusters' + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + operationId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * List Async Operations, currently in progress, in a cluster + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterRp, + Parameters.clusterResourceName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatusList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}/operations/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterRp, + Parameters.clusterResourceName, + Parameters.clusterName, + Parameters.extensionName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatusList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts index e749cc7bf2dd..f79a063a9814 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts @@ -26,7 +26,8 @@ export class Operations { } /** - * List all the available operations the KubernetesConfiguration resource provider supports. + * List all the available operations the KubernetesConfiguration resource provider supports, in + * this api-version. * @param [options] The optional parameters * @returns Promise */ @@ -50,7 +51,8 @@ export class Operations { } /** - * List all the available operations the KubernetesConfiguration resource provider supports. + * List all the available operations the KubernetesConfiguration resource provider supports, in + * this api-version. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts index 635777cdfb10..e0b062c7d07d 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts @@ -17,7 +17,8 @@ import { SourceControlConfigurationClientContext } from "./sourceControlConfigur class SourceControlConfigurationClient extends SourceControlConfigurationClientContext { // Operation groups - sourceControlConfigurations: operations.SourceControlConfigurations; + extensions: operations.Extensions; + operationStatus: operations.OperationStatus; operations: operations.Operations; /** @@ -28,13 +29,13 @@ class SourceControlConfigurationClient extends SourceControlConfigurationClientC * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000) + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SourceControlConfigurationClientOptions) { super(credentials, subscriptionId, options); - this.sourceControlConfigurations = new operations.SourceControlConfigurations(this); + this.extensions = new operations.Extensions(this); + this.operationStatus = new operations.OperationStatus(this); this.operations = new operations.Operations(this); } } diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts index 214ae99b87e9..097a54223de4 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts @@ -9,16 +9,16 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-kubernetesconfiguration"; const packageVersion = "3.1.1"; export class SourceControlConfigurationClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** * Initializes a new instance of the SourceControlConfigurationClient class. @@ -28,8 +28,7 @@ export class SourceControlConfigurationClientContext extends msRestAzure.AzureSe * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000) + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.SourceControlConfigurationClientOptions) { @@ -50,7 +49,7 @@ export class SourceControlConfigurationClientContext extends msRestAzure.AzureSe super(credentials, options); - this.apiVersion = '2021-03-01'; + this.apiVersion = '2021-09-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";