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..f6055187ae09 --- /dev/null +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/extensionsMappers.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +export { + BaseResource, + ComplianceStatus, + ConfigurationIdentity, + ErrorDefinition, + ErrorResponse, + ExtensionInstance, + ExtensionInstanceForCreate, + ExtensionInstanceForList, + ExtensionInstancesList, + ExtensionInstanceUpdate, + ExtensionStatus, + HelmOperatorProperties, + ProxyResource, + Resource, + Scope, + ScopeCluster, + ScopeNamespace, + SourceControlConfiguration, + SourceControlConfigurationForCreate +} from "../models/mappers"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts index d0d7fd2ed82d..47b85f534ea8 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts @@ -54,19 +54,12 @@ export interface Result { export interface ErrorDefinition { /** * Service specific error code which serves as the substatus for the HTTP error code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly code?: string; + code: string; /** * Description of the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; - /** - * Internal error details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly details?: ErrorDefinition[]; + message: string; } /** @@ -88,7 +81,7 @@ export interface ComplianceStatus { * 'Noncompliant', 'Installed', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly complianceState?: ComplianceState; + readonly complianceState?: ComplianceStateType; /** * Datetime the configuration was last applied. */ @@ -100,7 +93,7 @@ export interface ComplianceStatus { /** * Level of the message. Possible values include: 'Error', 'Warning', 'Information' */ - messageLevel?: MessageLevel; + messageLevel?: MessageLevelType; } /** @@ -118,7 +111,7 @@ export interface HelmOperatorProperties { } /** - * The SourceControl Configuration object. + * The SourceControl Configuration object returned in Get & Put response. */ export interface SourceControlConfiguration extends ProxyResource { /** @@ -146,7 +139,7 @@ export interface SourceControlConfiguration extends ProxyResource { * Scope at which the operator will be installed. Possible values include: 'cluster', * 'namespace'. Default value: 'cluster'. */ - operatorScope?: OperatorScope; + operatorScope?: OperatorScopeType; /** * Public Key associated with this SourceControl configuration (either generated within the * cluster or provided by the user). @@ -154,10 +147,9 @@ export interface SourceControlConfiguration extends ProxyResource { */ readonly repositoryPublicKey?: string; /** - * Option to enable Helm Operator for this git configuration. Possible values include: 'true', - * 'false' + * Option to enable Helm Operator for this git configuration. */ - enableHelmOperator?: EnableHelmOperator; + enableHelmOperator?: boolean; /** * Properties for Helm operator. */ @@ -167,12 +159,72 @@ export interface SourceControlConfiguration extends ProxyResource { * 'Deleting', 'Running', 'Succeeded', 'Failed' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly provisioningState?: ProvisioningState; + readonly provisioningState?: ProvisioningStateType; /** * Compliance Status of the Configuration * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly complianceStatus?: ComplianceStatus; + /** + * DateLiteral (per ISO8601) noting the time the resource was created by the client (user). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationTime?: string; + /** + * DateLiteral (per ISO8601) noting the time the resource was modified by the client (user). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedTime?: string; +} + +/** + * The SourceControl Configuration object to create a new configuration. + */ +export interface SourceControlConfigurationForCreate extends ProxyResource { + /** + * Url of the SourceControl Repository. + */ + repositoryUrl?: string; + /** + * The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric + * characters, hyphen and period only. Default value: 'default'. + */ + operatorNamespace?: string; + /** + * Instance name of the operator - identifying the specific configuration. + */ + operatorInstanceName?: string; + /** + * Type of the operator. Possible values include: 'Flux' + */ + operatorType?: OperatorType; + /** + * Any Parameters for the Operator instance in string format. + */ + operatorParams?: string; + /** + * Name-value pairs of protected configuration settings for the configuration + */ + configurationProtectedSettings?: { [propertyName: string]: string }; + /** + * Scope at which the operator will be installed. Possible values include: 'cluster', + * 'namespace'. Default value: 'cluster'. + */ + operatorScope?: OperatorScopeType; + /** + * 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.** + */ + readonly repositoryPublicKey?: string; + /** + * Option to enable Helm Operator for this git configuration. + */ + enableHelmOperator?: boolean; + /** + * Properties for Helm operator. + */ + helmOperatorProperties?: HelmOperatorProperties; } /** @@ -211,6 +263,276 @@ export interface ResourceProviderOperation { display?: ResourceProviderOperationDisplay; } +/** + * Specifies that the scope of the extensionInstance is Cluster + */ +export interface ScopeCluster { + /** + * Namespace where the extension Release must be placed, for a Cluster scoped extensionInstance. + * If this namespace does not exist, it will be created + */ + releaseNamespace?: string; +} + +/** + * Specifies that the scope of the extensionInstance is Namespace + */ +export interface ScopeNamespace { + /** + * Namespace where the extensionInstance will be created for an Namespace scoped + * extensionInstance. If this namespace does not exist, it will be created + */ + targetNamespace?: string; +} + +/** + * Scope of the extensionInstance. It can be either Cluster or Namespace; but not both. + */ +export interface Scope { + /** + * Specifies that the scope of the extensionInstance is Cluster + */ + cluster?: ScopeCluster; + /** + * Specifies that the scope of the extensionInstance is Namespace + */ + namespace?: ScopeNamespace; +} + +/** + * Status from this instance of the extension. + */ +export interface ExtensionStatus { + /** + * Status code provided by the Extension + */ + code?: string; + /** + * Short description of status of this instance 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 instance. + */ + message?: string; + /** + * DateLiteral (per ISO8601) noting the time of installation status. + */ + time?: string; +} + +/** + * Identity for the managed cluster. + */ +export interface ConfigurationIdentity { + /** + * The principal id of the system assigned identity which is used by the configuration. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant id of the system assigned identity which is used by the configuration. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The type of identity used for the configuration. Type 'SystemAssigned' will use an implicitly + * created identity. Type 'None' will not use Managed Identity for the configuration. Possible + * values include: 'SystemAssigned', 'None' + */ + type?: ResourceIdentityType; +} + +/** + * The Extension Instance object. + */ +export interface ExtensionInstance extends ProxyResource { + /** + * 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. + */ + extensionType?: string; + /** + * Flag to note if this instance participates in auto upgrade of minor version, or not. + */ + autoUpgradeMinorVersion?: boolean; + /** + * ReleaseTrain this extension instance participates in for auto-upgrade (e.g. Stable, Preview, + * etc.) - only if autoUpgradeMinorVersion is 'true'. + */ + releaseTrain?: string; + /** + * Version of the extension for this extension instance, if it is 'pinned' to a specific version. + * autoUpgradeMinorVersion must be 'false'. + */ + version?: string; + /** + * Scope at which the extension instance is installed. + */ + scope?: Scope; + /** + * Configuration settings, as name-value pairs for configuring this instance of the extension. + */ + configurationSettings?: { [propertyName: string]: string }; + /** + * Status of installation of this instance of the extension. Possible values include: 'Pending', + * 'Installed', 'Failed' + */ + installState?: InstallStateType; + /** + * Status from this instance of the extension. + */ + statuses?: ExtensionStatus[]; + /** + * DateLiteral (per ISO8601) noting the time the resource was created by the client (user). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationTime?: string; + /** + * DateLiteral (per ISO8601) noting the time the resource was modified by the client (user). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedTime?: string; + /** + * DateLiteral (per ISO8601) noting the time of last status from the agent. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastStatusTime?: string; + /** + * Error information from the Agent - e.g. errors during installation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorInfo?: ErrorDefinition; + /** + * The identity of the configuration. + */ + identity?: ConfigurationIdentity; +} + +/** + * Object to create a new Extension Instance. + */ +export interface ExtensionInstanceForCreate extends ProxyResource { + /** + * 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. + */ + extensionType?: string; + /** + * Flag to note if this instance participates in auto upgrade of minor version, or not. + */ + autoUpgradeMinorVersion?: boolean; + /** + * ReleaseTrain this extension instance participates in for auto-upgrade (e.g. Stable, Preview, + * etc.) - only if autoUpgradeMinorVersion is 'true'. + */ + releaseTrain?: string; + /** + * Version of the extension for this extension instance, if it is 'pinned' to a specific version. + * autoUpgradeMinorVersion must be 'false'. + */ + version?: string; + /** + * Scope at which the extension instance is installed. + */ + scope?: Scope; + /** + * Configuration settings, as name-value pairs for configuring this instance of the extension. + */ + configurationSettings?: { [propertyName: string]: string }; + /** + * Configuration settings that are sensitive, as name-value pairs for configuring this instance + * of the extension. + */ + configurationProtectedSettings?: { [propertyName: string]: string }; + /** + * The identity of the configuration. + */ + identity?: ConfigurationIdentity; +} + +/** + * The Extension Instance object. + */ +export interface ExtensionInstanceForList extends ProxyResource { + /** + * 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. + */ + extensionType?: string; + /** + * Flag to note if this instance participates in auto upgrade of minor version, or not. + */ + autoUpgradeMinorVersion?: boolean; + /** + * ReleaseTrain this extension instance participates in for auto-upgrade (e.g. Stable, Preview, + * etc.) - only if autoUpgradeMinorVersion is 'true'. + */ + releaseTrain?: string; + /** + * Version of the extension for this extension instance, if it is 'pinned' to a specific version. + */ + version?: string; + /** + * Scope at which the extension instance is installed. + */ + scope?: Scope; + /** + * Status of installation of this instance of the extension. Possible values include: 'Pending', + * 'Installed', 'Failed' + */ + installState?: InstallStateType; + /** + * DateLiteral (per ISO8601) noting the time the resource was created by the client (user). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creationTime?: string; + /** + * DateLiteral (per ISO8601) noting the time the resource was modified by the client (user). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedTime?: string; + /** + * DateLiteral (per ISO8601) noting the time of last status from the agent. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastStatusTime?: string; + /** + * Error information from the Agent - e.g. errors during installation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorInfo?: ErrorDefinition; + /** + * The identity of the configuration. + */ + identity?: ConfigurationIdentity; +} + +/** + * Update Extension Instance request object. + */ +export interface ExtensionInstanceUpdate { + /** + * Flag to note if this instance participates in Extension Lifecycle Management or not. + */ + autoUpgradeMinorVersion?: boolean; + /** + * ReleaseTrain this extension instance participates in for auto-upgrade (e.g. Stable, Preview, + * etc.) - only if autoUpgradeMinorVersion is 'true'. + */ + releaseTrain?: string; + /** + * Version number of extension, to 'pin' to a specific version. autoUpgradeMinorVersion must be + * 'false'. + */ + version?: string; +} + /** * An interface representing SourceControlConfigurationClientOptions. */ @@ -246,20 +568,34 @@ export interface ResourceProviderOperationList extends Array + */ +export interface ExtensionInstancesList extends Array { + /** + * URL to get the next set of extension instance objects, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for ComplianceStateType. * Possible values include: 'Pending', 'Compliant', 'Noncompliant', 'Installed', 'Failed' * @readonly * @enum {string} */ -export type ComplianceState = 'Pending' | 'Compliant' | 'Noncompliant' | 'Installed' | 'Failed'; +export type ComplianceStateType = 'Pending' | 'Compliant' | 'Noncompliant' | 'Installed' | 'Failed'; /** - * Defines values for MessageLevel. + * Defines values for MessageLevelType. * Possible values include: 'Error', 'Warning', 'Information' * @readonly * @enum {string} */ -export type MessageLevel = 'Error' | 'Warning' | 'Information'; +export type MessageLevelType = 'Error' | 'Warning' | 'Information'; /** * Defines values for OperatorType. @@ -270,28 +606,44 @@ export type MessageLevel = 'Error' | 'Warning' | 'Information'; export type OperatorType = 'Flux'; /** - * Defines values for OperatorScope. + * Defines values for OperatorScopeType. * Possible values include: 'cluster', 'namespace' * @readonly * @enum {string} */ -export type OperatorScope = 'cluster' | 'namespace'; +export type OperatorScopeType = 'cluster' | 'namespace'; /** - * Defines values for EnableHelmOperator. - * Possible values include: 'true', 'false' + * Defines values for ProvisioningStateType. + * Possible values include: 'Accepted', 'Deleting', 'Running', 'Succeeded', 'Failed' * @readonly * @enum {string} */ -export type EnableHelmOperator = 'true' | 'false'; +export type ProvisioningStateType = 'Accepted' | 'Deleting' | 'Running' | 'Succeeded' | 'Failed'; /** - * Defines values for ProvisioningState. - * Possible values include: 'Accepted', 'Deleting', 'Running', 'Succeeded', 'Failed' + * Defines values for InstallStateType. + * Possible values include: 'Pending', 'Installed', 'Failed' * @readonly * @enum {string} */ -export type ProvisioningState = 'Accepted' | 'Deleting' | 'Running' | 'Succeeded' | 'Failed'; +export type InstallStateType = 'Pending' | 'Installed' | 'Failed'; + +/** + * Defines values for LevelType. + * Possible values include: 'Error', 'Warning', 'Information' + * @readonly + * @enum {string} + */ +export type LevelType = 'Error' | 'Warning' | 'Information'; + +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned' | 'None'; /** * Defines values for ClusterRp. @@ -357,6 +709,86 @@ export type ClusterRp3 = 'Microsoft.ContainerService' | 'Microsoft.Kubernetes'; */ export type ClusterResourceName3 = 'managedClusters' | 'connectedClusters'; +/** + * Defines values for ClusterRp4. + * Possible values include: 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @readonly + * @enum {string} + */ +export type ClusterRp4 = 'Microsoft.ContainerService' | 'Microsoft.Kubernetes'; + +/** + * Defines values for ClusterResourceName4. + * Possible values include: 'managedClusters', 'connectedClusters' + * @readonly + * @enum {string} + */ +export type ClusterResourceName4 = 'managedClusters' | 'connectedClusters'; + +/** + * Defines values for ClusterRp5. + * Possible values include: 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @readonly + * @enum {string} + */ +export type ClusterRp5 = 'Microsoft.ContainerService' | 'Microsoft.Kubernetes'; + +/** + * Defines values for ClusterResourceName5. + * Possible values include: 'managedClusters', 'connectedClusters' + * @readonly + * @enum {string} + */ +export type ClusterResourceName5 = 'managedClusters' | 'connectedClusters'; + +/** + * Defines values for ClusterRp6. + * Possible values include: 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @readonly + * @enum {string} + */ +export type ClusterRp6 = 'Microsoft.ContainerService' | 'Microsoft.Kubernetes'; + +/** + * Defines values for ClusterResourceName6. + * Possible values include: 'managedClusters', 'connectedClusters' + * @readonly + * @enum {string} + */ +export type ClusterResourceName6 = 'managedClusters' | 'connectedClusters'; + +/** + * Defines values for ClusterRp7. + * Possible values include: 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @readonly + * @enum {string} + */ +export type ClusterRp7 = 'Microsoft.ContainerService' | 'Microsoft.Kubernetes'; + +/** + * Defines values for ClusterResourceName7. + * Possible values include: 'managedClusters', 'connectedClusters' + * @readonly + * @enum {string} + */ +export type ClusterResourceName7 = 'managedClusters' | 'connectedClusters'; + +/** + * Defines values for ClusterRp8. + * Possible values include: 'Microsoft.ContainerService', 'Microsoft.Kubernetes' + * @readonly + * @enum {string} + */ +export type ClusterRp8 = 'Microsoft.ContainerService' | 'Microsoft.Kubernetes'; + +/** + * Defines values for ClusterResourceName8. + * Possible values include: 'managedClusters', 'connectedClusters' + * @readonly + * @enum {string} + */ +export type ClusterResourceName8 = 'managedClusters' | 'connectedClusters'; + /** * Contains response data for the get operation. */ @@ -476,3 +908,103 @@ export type OperationsListNextResponse = ResourceProviderOperationList & { parsedBody: ResourceProviderOperationList; }; }; + +/** + * Contains response data for the create operation. + */ +export type ExtensionsCreateResponse = ExtensionInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtensionInstance; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ExtensionsGetResponse = ExtensionInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtensionInstance; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ExtensionsUpdateResponse = ExtensionInstance & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtensionInstance; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ExtensionsListResponse = ExtensionInstancesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtensionInstancesList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ExtensionsListNextResponse = ExtensionInstancesList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExtensionInstancesList; + }; +}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts index c2f7ca5b6462..82298271eaab 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts @@ -77,31 +77,18 @@ export const ErrorDefinition: msRest.CompositeMapper = { className: "ErrorDefinition", modelProperties: { code: { - readOnly: true, + required: true, serializedName: "code", type: { name: "String" } }, message: { - readOnly: true, + required: true, serializedName: "message", type: { name: "String" } - }, - details: { - readOnly: true, - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDefinition" - } - } - } } } } @@ -236,7 +223,7 @@ export const SourceControlConfiguration: msRest.CompositeMapper = { enableHelmOperator: { serializedName: "properties.enableHelmOperator", type: { - name: "String" + name: "Boolean" } }, helmOperatorProperties: { @@ -260,6 +247,100 @@ export const SourceControlConfiguration: msRest.CompositeMapper = { name: "Composite", className: "ComplianceStatus" } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "String" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "String" + } + } + } + } +}; + +export const SourceControlConfigurationForCreate: msRest.CompositeMapper = { + serializedName: "SourceControlConfigurationForCreate", + type: { + name: "Composite", + className: "SourceControlConfigurationForCreate", + modelProperties: { + ...ProxyResource.type.modelProperties, + repositoryUrl: { + serializedName: "properties.repositoryUrl", + type: { + name: "String" + } + }, + operatorNamespace: { + serializedName: "properties.operatorNamespace", + defaultValue: 'default', + type: { + name: "String" + } + }, + operatorInstanceName: { + serializedName: "properties.operatorInstanceName", + type: { + name: "String" + } + }, + operatorType: { + serializedName: "properties.operatorType", + type: { + name: "String" + } + }, + operatorParams: { + serializedName: "properties.operatorParams", + type: { + name: "String" + } + }, + configurationProtectedSettings: { + serializedName: "properties.configurationProtectedSettings", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + operatorScope: { + serializedName: "properties.operatorScope", + defaultValue: 'cluster', + type: { + name: "String" + } + }, + repositoryPublicKey: { + readOnly: true, + serializedName: "properties.repositoryPublicKey", + type: { + name: "String" + } + }, + enableHelmOperator: { + serializedName: "properties.enableHelmOperator", + type: { + name: "Boolean" + } + }, + helmOperatorProperties: { + serializedName: "properties.helmOperatorProperties", + type: { + name: "Composite", + className: "HelmOperatorProperties" + } } } } @@ -322,6 +403,427 @@ export const ResourceProviderOperation: msRest.CompositeMapper = { } }; +export const ScopeCluster: msRest.CompositeMapper = { + serializedName: "ScopeCluster", + type: { + name: "Composite", + className: "ScopeCluster", + modelProperties: { + releaseNamespace: { + serializedName: "releaseNamespace", + type: { + name: "String" + } + } + } + } +}; + +export const ScopeNamespace: msRest.CompositeMapper = { + serializedName: "ScopeNamespace", + type: { + name: "Composite", + className: "ScopeNamespace", + modelProperties: { + targetNamespace: { + serializedName: "targetNamespace", + type: { + name: "String" + } + } + } + } +}; + +export const Scope: msRest.CompositeMapper = { + serializedName: "Scope", + type: { + name: "Composite", + className: "Scope", + modelProperties: { + cluster: { + serializedName: "cluster", + type: { + name: "Composite", + className: "ScopeCluster" + } + }, + namespace: { + serializedName: "namespace", + type: { + name: "Composite", + className: "ScopeNamespace" + } + } + } + } +}; + +export const ExtensionStatus: msRest.CompositeMapper = { + serializedName: "ExtensionStatus", + type: { + name: "Composite", + className: "ExtensionStatus", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + displayStatus: { + serializedName: "displayStatus", + type: { + name: "String" + } + }, + level: { + serializedName: "level", + defaultValue: 'Information', + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "String" + } + } + } + } +}; + +export const ConfigurationIdentity: msRest.CompositeMapper = { + serializedName: "ConfigurationIdentity", + type: { + name: "Composite", + className: "ConfigurationIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "None" + ] + } + } + } + } +}; + +export const ExtensionInstance: msRest.CompositeMapper = { + serializedName: "ExtensionInstance", + type: { + name: "Composite", + className: "ExtensionInstance", + modelProperties: { + ...ProxyResource.type.modelProperties, + extensionType: { + serializedName: "properties.extensionType", + type: { + name: "String" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + releaseTrain: { + serializedName: "properties.releaseTrain", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "Composite", + className: "Scope" + } + }, + configurationSettings: { + serializedName: "properties.configurationSettings", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + installState: { + serializedName: "properties.installState", + type: { + name: "String" + } + }, + statuses: { + serializedName: "properties.statuses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExtensionStatus" + } + } + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "String" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "String" + } + }, + lastStatusTime: { + readOnly: true, + serializedName: "properties.lastStatusTime", + type: { + name: "String" + } + }, + errorInfo: { + readOnly: true, + serializedName: "properties.errorInfo", + type: { + name: "Composite", + className: "ErrorDefinition" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ConfigurationIdentity" + } + } + } + } +}; + +export const ExtensionInstanceForCreate: msRest.CompositeMapper = { + serializedName: "ExtensionInstanceForCreate", + type: { + name: "Composite", + className: "ExtensionInstanceForCreate", + modelProperties: { + ...ProxyResource.type.modelProperties, + extensionType: { + serializedName: "properties.extensionType", + type: { + name: "String" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + releaseTrain: { + serializedName: "properties.releaseTrain", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "Composite", + className: "Scope" + } + }, + configurationSettings: { + serializedName: "properties.configurationSettings", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + configurationProtectedSettings: { + serializedName: "properties.configurationProtectedSettings", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ConfigurationIdentity" + } + } + } + } +}; + +export const ExtensionInstanceForList: msRest.CompositeMapper = { + serializedName: "ExtensionInstanceForList", + type: { + name: "Composite", + className: "ExtensionInstanceForList", + modelProperties: { + ...ProxyResource.type.modelProperties, + extensionType: { + serializedName: "properties.extensionType", + type: { + name: "String" + } + }, + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + releaseTrain: { + serializedName: "properties.releaseTrain", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "Composite", + className: "Scope" + } + }, + installState: { + serializedName: "properties.installState", + type: { + name: "String" + } + }, + creationTime: { + readOnly: true, + serializedName: "properties.creationTime", + type: { + name: "String" + } + }, + lastModifiedTime: { + readOnly: true, + serializedName: "properties.lastModifiedTime", + type: { + name: "String" + } + }, + lastStatusTime: { + readOnly: true, + serializedName: "properties.lastStatusTime", + type: { + name: "String" + } + }, + errorInfo: { + readOnly: true, + serializedName: "properties.errorInfo", + type: { + name: "Composite", + className: "ErrorDefinition" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ConfigurationIdentity" + } + } + } + } +}; + +export const ExtensionInstanceUpdate: msRest.CompositeMapper = { + serializedName: "ExtensionInstanceUpdate", + type: { + name: "Composite", + className: "ExtensionInstanceUpdate", + modelProperties: { + autoUpgradeMinorVersion: { + serializedName: "properties.autoUpgradeMinorVersion", + type: { + name: "Boolean" + } + }, + releaseTrain: { + serializedName: "properties.releaseTrain", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + } + } + } +}; + export const SourceControlConfigurationList: msRest.CompositeMapper = { serializedName: "SourceControlConfigurationList", type: { @@ -380,3 +882,33 @@ export const ResourceProviderOperationList: msRest.CompositeMapper = { } } }; + +export const ExtensionInstancesList: msRest.CompositeMapper = { + serializedName: "ExtensionInstancesList", + type: { + name: "Composite", + className: "ExtensionInstancesList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExtensionInstanceForList" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts index f0572ad3a8fd..37b0a65c2670 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts @@ -60,6 +60,16 @@ export const clusterRp: msRest.OperationURLParameter = { } } }; +export const extensionInstanceName: msRest.OperationURLParameter = { + parameterPath: "extensionInstanceName", + mapper: { + required: true, + serializedName: "extensionInstanceName", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/sourceControlConfigurationsMappers.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/sourceControlConfigurationsMappers.ts index 2e67a61b96f1..2d29def99e91 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/sourceControlConfigurationsMappers.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/sourceControlConfigurationsMappers.ts @@ -9,11 +9,20 @@ export { BaseResource, ComplianceStatus, + ConfigurationIdentity, ErrorDefinition, ErrorResponse, + ExtensionInstance, + ExtensionInstanceForCreate, + ExtensionInstanceForList, + ExtensionStatus, HelmOperatorProperties, ProxyResource, Resource, + Scope, + ScopeCluster, + ScopeNamespace, SourceControlConfiguration, + SourceControlConfigurationForCreate, SourceControlConfigurationList } from "../models/mappers"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/extensions.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/extensions.ts new file mode 100644 index 000000000000..027ce10146e9 --- /dev/null +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/extensions.ts @@ -0,0 +1,516 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/extensionsMappers"; +import * as Parameters from "../models/parameters"; +import { SourceControlConfigurationClientContext } from "../sourceControlConfigurationClientContext"; + +/** Class representing a Extensions. */ +export class Extensions { + private readonly client: SourceControlConfigurationClientContext; + + /** + * Create a Extensions. + * @param {SourceControlConfigurationClientContext} client Reference to the service client. + */ + constructor(client: SourceControlConfigurationClientContext) { + this.client = client; + } + + /** + * Create a new Kubernetes Cluster Extension Instance. + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param extensionInstance Properties necessary to Create an Extension Instance. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceForCreate, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param extensionInstance Properties necessary to Create an Extension Instance. + * @param callback The callback + */ + create(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceForCreate, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param extensionInstance Properties necessary to Create an Extension Instance. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceForCreate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, clusterRp: Models.ClusterRp4, clusterResourceName: Models.ClusterResourceName4, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceForCreate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionInstanceName, + extensionInstance, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Gets details of the Kubernetes Cluster Extension Instance. + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, extensionInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param callback The callback + */ + get(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, extensionInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, extensionInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterRp: Models.ClusterRp5, clusterResourceName: Models.ClusterResourceName5, clusterName: string, extensionInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionInstanceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update an existing Kubernetes Cluster Extension Instance. + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param extensionInstance Properties to Update in the Extension Instance. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceUpdate, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param extensionInstance Properties to Update in the Extension Instance. + * @param callback The callback + */ + update(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceUpdate, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param extensionInstance Properties to Update in the Extension Instance. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceUpdate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, clusterRp: Models.ClusterRp6, clusterResourceName: Models.ClusterResourceName6, clusterName: string, extensionInstanceName: string, extensionInstance: Models.ExtensionInstanceUpdate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionInstanceName, + extensionInstance, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete a Kubernetes Cluster Extension Instance. This will cause the Agent to Uninstall the + * extension instance from the cluster. + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp7, clusterResourceName: Models.ClusterResourceName7, clusterName: string, extensionInstanceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp7, clusterResourceName: Models.ClusterResourceName7, clusterName: string, extensionInstanceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @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 extensionInstanceName Name of an instance of the Extension. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp7, clusterResourceName: Models.ClusterResourceName7, clusterName: string, extensionInstanceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp7, clusterResourceName: Models.ClusterResourceName7, clusterName: string, extensionInstanceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionInstanceName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * List all Source Control Configurations. + * @param resourceGroupName The name of the resource group. + * @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.ClusterRp8, clusterResourceName: Models.ClusterResourceName8, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @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.ClusterRp8, clusterResourceName: Models.ClusterResourceName8, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @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.ClusterRp8, clusterResourceName: Models.ClusterResourceName8, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, clusterRp: Models.ClusterRp8, clusterResourceName: Models.ClusterResourceName8, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * List all Source Control Configurations. + * @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 createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterRp, + Parameters.clusterResourceName, + Parameters.clusterName, + Parameters.extensionInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "extensionInstance", + mapper: { + ...Mappers.ExtensionInstanceForCreate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ExtensionInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterRp, + Parameters.clusterResourceName, + Parameters.clusterName, + Parameters.extensionInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExtensionInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterRp, + Parameters.clusterResourceName, + Parameters.clusterName, + Parameters.extensionInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "extensionInstance", + mapper: { + ...Mappers.ExtensionInstanceUpdate, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ExtensionInstance + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionInstanceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterRp, + Parameters.clusterResourceName, + Parameters.clusterName, + Parameters.extensionInstanceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + 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 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExtensionInstancesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExtensionInstancesList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts index b2b3dc3f9d01..4c7219802435 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts @@ -10,3 +10,4 @@ export * from "./sourceControlConfigurations"; export * from "./operations"; +export * from "./extensions"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts index 769e6cbc8979..9b1648c7cbc8 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts @@ -98,7 +98,7 @@ export class SourceControlConfigurations { * @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): Promise; + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfigurationForCreate, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -112,7 +112,7 @@ export class SourceControlConfigurations { * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. * @param callback The callback */ - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfigurationForCreate, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -127,8 +127,8 @@ export class SourceControlConfigurations { * @param options The optional parameters * @param callback The callback */ - 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 { + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfigurationForCreate, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfigurationForCreate, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -323,7 +323,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "sourceControlConfiguration", mapper: { - ...Mappers.SourceControlConfiguration, + ...Mappers.SourceControlConfigurationForCreate, required: true } }, diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts index 02b4e8fb05b1..6b8f120c9a7d 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts @@ -19,6 +19,7 @@ class SourceControlConfigurationClient extends SourceControlConfigurationClientC // Operation groups sourceControlConfigurations: operations.SourceControlConfigurations; operations: operations.Operations; + extensions: operations.Extensions; /** * Initializes a new instance of the SourceControlConfigurationClient class. @@ -31,6 +32,7 @@ class SourceControlConfigurationClient extends SourceControlConfigurationClientC super(credentials, subscriptionId, options); this.sourceControlConfigurations = new operations.SourceControlConfigurations(this); this.operations = new operations.Operations(this); + this.extensions = new operations.Extensions(this); } } diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts index 22057d8f4360..1b867bd7dc01 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts @@ -45,7 +45,7 @@ export class SourceControlConfigurationClientContext extends msRestAzure.AzureSe super(credentials, options); - this.apiVersion = '2019-11-01-preview'; + this.apiVersion = '2020-07-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";