diff --git a/rush.json b/rush.json index 59981552adfc..7950070bb864 100644 --- a/rush.json +++ b/rush.json @@ -1,7 +1,7 @@ /** * This is the main configuration file for Rush. * For full documentation, please see https://rushjs.io - */ { + */{ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", /** * (Required) This specifies the version of the Rush engine to be used in this repo. @@ -2311,6 +2311,11 @@ "packageName": "@azure/arm-connectedcache", "projectFolder": "sdk/connectedcache/arm-connectedcache", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-kubernetesconfiguration-extensions", + "projectFolder": "sdk/kubernetesconfiguration/arm-kubernetesconfiguration", + "versionPolicyName": "management" } ] -} +} \ No newline at end of file diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/LICENSE b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/LICENSE index 3a1d9b6f24f7..7d5934740965 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/LICENSE +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md index 2e1c2b1a231e..763b74423aeb 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md @@ -1,12 +1,12 @@ -# Azure SourceControlConfiguration client library for JavaScript +# Azure Extensions client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure SourceControlConfiguration client. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Extensions client. -KubernetesConfiguration Client +KubernetesConfiguration Extensions Client [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-kubernetesconfiguration) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-kubernetesconfiguration) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-kubernetesconfiguration-extensions) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-kubernetesconfiguration-extensions?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -22,18 +22,18 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP - An [Azure subscription][azure_sub]. -### Install the `@azure/arm-kubernetesconfiguration` package +### Install the `@azure/arm-kubernetesconfiguration-extensions` package -Install the Azure SourceControlConfiguration client library for JavaScript with `npm`: +Install the Azure Extensions client library for JavaScript with `npm`: ```bash -npm install @azure/arm-kubernetesconfiguration +npm install @azure/arm-kubernetesconfiguration-extensions ``` -### Create and authenticate a `SourceControlConfigurationClient` +### Create and authenticate a `ExtensionsClient` -To create a client object to access the Azure SourceControlConfiguration API, you will need the `endpoint` of your Azure SourceControlConfiguration resource and a `credential`. The Azure SourceControlConfiguration client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your Azure SourceControlConfiguration resource in the [Azure Portal][azure_portal]. +To create a client object to access the Azure Extensions API, you will need the `endpoint` of your Azure Extensions resource and a `credential`. The Azure Extensions client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure Extensions resource in the [Azure Portal][azure_portal]. You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). @@ -43,25 +43,25 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below npm install @azure/identity ``` -You will also need to **register a new AAD application and grant access to Azure SourceControlConfiguration** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +You will also need to **register a new AAD application and grant access to Azure Extensions** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript -const { SourceControlConfigurationClient } = require("@azure/arm-kubernetesconfiguration"); +const { ExtensionsClient } = require("@azure/arm-kubernetesconfiguration-extensions"); const { DefaultAzureCredential } = require("@azure/identity"); // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new SourceControlConfigurationClient(new DefaultAzureCredential(), subscriptionId); +const client = new ExtensionsClient(new DefaultAzureCredential(), subscriptionId); // For client-side applications running in the browser, use this code instead: // const credential = new InteractiveBrowserCredential({ // tenantId: "", // clientId: "" // }); -// const client = new SourceControlConfigurationClient(credential, subscriptionId); +// const client = new ExtensionsClient(credential, subscriptionId); ``` @@ -70,9 +70,9 @@ To use this client library in the browser, first you need to use a bundler. For ## Key concepts -### SourceControlConfigurationClient +### ExtensionsClient -`SourceControlConfigurationClient` is the primary interface for developers using the Azure SourceControlConfiguration client library. Explore the methods on this client object to understand the different features of the Azure SourceControlConfiguration service that you can access. +`ExtensionsClient` is the primary interface for developers using the Azure Extensions client library. Explore the methods on this client object to understand the different features of the Azure Extensions service that you can access. ## Troubleshooting diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json index a5e1ce8e50e7..602f7b5d1a90 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/_meta.json @@ -1,8 +1,8 @@ { - "commit": "baa82396a21dcc1c79a6aeea185589749515012d", - "readme": "specification/kubernetesconfiguration/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\kubernetesconfiguration\\resource-manager\\readme.md --use=@autorest/typescript@6.0.8 --generate-sample=true", + "commit": "a6405ab5b39aefc288e110e774fd0116283a725b", + "readme": "specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.8" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/api-extractor.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/api-extractor.json index a8b1c2fbae4b..4b3d4ef4e76b 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/api-extractor.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/api-extractor.json @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-kubernetesconfiguration.d.ts" + "publicTrimmedFilePath": "./types/arm-kubernetesconfiguration-extensions.d.ts" }, "messages": { "tsdocMessageReporting": { diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json index 36c1b1fa9371..0580efba8f2f 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/package.json @@ -1,19 +1,19 @@ { - "name": "@azure/arm-kubernetesconfiguration", + "name": "@azure/arm-kubernetesconfiguration-extensions", "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "A generated SDK for SourceControlConfigurationClient.", - "version": "6.1.1", + "description": "A generated SDK for ExtensionsClient.", + "version": "1.0.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.12.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -26,20 +26,24 @@ "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", - "types": "./types/arm-kubernetesconfiguration.d.ts", + "types": "./types/arm-kubernetesconfiguration-extensions.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@microsoft/api-extractor": "^7.31.1", + "typescript": "~5.6.2", + "uglify-js": "^3.4.9", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^10.0.0", - "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "cross-env": "^7.0.2", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -67,47 +71,39 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, "//metadata": { "constantPaths": [ { - "path": "src/sourceControlConfigurationClient.ts", + "path": "src/extensionsClient.ts", "prefix": "packageDetails" } ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-kubernetesconfiguration?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/kubernetesconfiguration/arm-kubernetesconfiguration" +} \ No newline at end of file diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/sample.env b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/sample.env +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/extensionsClient.ts similarity index 71% rename from sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts rename to sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/extensionsClient.ts index f9730504e1a2..633570e664b8 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClient.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/extensionsClient.ts @@ -11,34 +11,20 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { - ExtensionsImpl, - OperationStatusImpl, - FluxConfigurationsImpl, - FluxConfigOperationStatusImpl, - SourceControlConfigurationsImpl, - OperationsImpl -} from "./operations"; -import { - Extensions, - OperationStatus, - FluxConfigurations, - FluxConfigOperationStatus, - SourceControlConfigurations, - Operations -} from "./operationsInterfaces"; -import { SourceControlConfigurationClientOptionalParams } from "./models"; +import { ExtensionsImpl, OperationStatusImpl } from "./operations"; +import { Extensions, OperationStatus } from "./operationsInterfaces"; +import { ExtensionsClientOptionalParams } from "./models"; -export class SourceControlConfigurationClient extends coreClient.ServiceClient { +export class ExtensionsClient extends coreClient.ServiceClient { $host: string; subscriptionId: string; apiVersion: string; /** - * Initializes a new instance of the SourceControlConfigurationClient class. + * Initializes a new instance of the ExtensionsClient class. * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId The ID of the target subscription. * @param options The parameter options @@ -46,7 +32,7 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: SourceControlConfigurationClientOptionalParams + options?: ExtensionsClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -59,12 +45,12 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { if (!options) { options = {}; } - const defaults: SourceControlConfigurationClientOptionalParams = { + const defaults: ExtensionsClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-kubernetesconfiguration/6.1.1`; + const packageDetails = `azsdk-js-arm-kubernetesconfiguration-extensions/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -74,20 +60,21 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -97,7 +84,7 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -107,9 +94,9 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -117,15 +104,9 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-05-01"; + this.apiVersion = options.apiVersion || "2024-11-01"; this.extensions = new ExtensionsImpl(this); this.operationStatus = new OperationStatusImpl(this); - this.fluxConfigurations = new FluxConfigurationsImpl(this); - this.fluxConfigOperationStatus = new FluxConfigOperationStatusImpl(this); - this.sourceControlConfigurations = new SourceControlConfigurationsImpl( - this - ); - this.operations = new OperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -138,7 +119,7 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -152,15 +133,11 @@ export class SourceControlConfigurationClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } extensions: Extensions; operationStatus: OperationStatus; - fluxConfigurations: FluxConfigurations; - fluxConfigOperationStatus: FluxConfigOperationStatus; - sourceControlConfigurations: SourceControlConfigurations; - operations: Operations; } diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/index.ts index a91df6c3016a..7ecca4698c52 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/index.ts @@ -9,5 +9,5 @@ /// export { getContinuationToken } from "./pagingHelper"; export * from "./models"; -export { SourceControlConfigurationClient } from "./sourceControlConfigurationClient"; +export { ExtensionsClient } from "./extensionsClient"; export * from "./operationsInterfaces"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/lroImpl.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/lroImpl.ts index 52f6eaacfb83..5f88efab981b 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/lroImpl.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/lroImpl.ts @@ -28,15 +28,15 @@ export function createLroSpec(inputs: { sendInitialRequest: () => sendOperationFn(args, spec), sendPollRequest: ( path: string, - options?: { abortSignal?: AbortSignalLike } + options?: { abortSignal?: AbortSignalLike }, ) => { const { requestBody, ...restSpec } = spec; return sendOperationFn(args, { ...restSpec, httpMethod: "GET", path, - abortSignal: options?.abortSignal + abortSignal: options?.abortSignal, }); - } + }, }; } diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts index 16d9da7c33fd..921f78e0866f 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/index.ts @@ -217,429 +217,6 @@ export interface OperationStatusResult { readonly error?: ErrorDetail; } -/** Parameters to reconcile to the GitRepository source kind type. */ -export interface GitRepositoryDefinition { - /** The URL to sync for the flux configuration git repository. */ - url?: string; - /** The maximum time to attempt to reconcile the cluster git repository source with the remote. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the cluster git repository source with the remote. */ - syncIntervalInSeconds?: number; - /** The source reference for the GitRepository object. */ - repositoryRef?: RepositoryRefDefinition; - /** Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH */ - sshKnownHosts?: string; - /** Plaintext HTTPS username used to access private git repositories over HTTPS */ - httpsUser?: string; - /** Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS */ - httpsCACert?: string; - /** Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. */ - localAuthRef?: string; -} - -/** The source reference for the GitRepository object. */ -export interface RepositoryRefDefinition { - /** The git repository branch name to checkout. */ - branch?: string; - /** The git repository tag name to checkout. This takes precedence over branch. */ - tag?: string; - /** The semver range used to match against git repository tags. This takes precedence over tag. */ - semver?: string; - /** The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. */ - commit?: string; -} - -/** Parameters to reconcile to the Bucket source kind type. */ -export interface BucketDefinition { - /** The URL to sync for the flux configuration S3 bucket. */ - url?: string; - /** The bucket name to sync from the url endpoint for the flux configuration. */ - bucketName?: string; - /** Specify whether to use insecure communication when puling data from the S3 bucket. */ - insecure?: boolean; - /** The maximum time to attempt to reconcile the cluster bucket source with the remote. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the cluster bucket source with the remote. */ - syncIntervalInSeconds?: number; - /** Plaintext access key used to securely access the S3 bucket */ - accessKey?: string; - /** Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. */ - localAuthRef?: string; -} - -/** Parameters to reconcile to the AzureBlob source kind type. */ -export interface AzureBlobDefinition { - /** The URL to sync for the flux configuration Azure Blob storage account. */ - url?: string; - /** The Azure Blob container name to sync from the url endpoint for the flux configuration. */ - containerName?: string; - /** The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the cluster Azure Blob source with the remote. */ - syncIntervalInSeconds?: number; - /** Parameters to authenticate using Service Principal. */ - servicePrincipal?: ServicePrincipalDefinition; - /** The account key (shared key) to access the storage account */ - accountKey?: string; - /** The Shared Access token to access the storage container */ - sasToken?: string; - /** Parameters to authenticate using a Managed Identity. */ - managedIdentity?: ManagedIdentityDefinition; - /** Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. */ - localAuthRef?: string; -} - -/** Parameters to authenticate using Service Principal. */ -export interface ServicePrincipalDefinition { - /** The client Id for authenticating a Service Principal. */ - clientId?: string; - /** The tenant Id for authenticating a Service Principal */ - tenantId?: string; - /** The client secret for authenticating a Service Principal */ - clientSecret?: string; - /** Base64-encoded certificate used to authenticate a Service Principal */ - clientCertificate?: string; - /** The password for the certificate used to authenticate a Service Principal */ - clientCertificatePassword?: string; - /** Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate */ - clientCertificateSendChain?: boolean; -} - -/** Parameters to authenticate using a Managed Identity. */ -export interface ManagedIdentityDefinition { - /** The client Id for authenticating a Managed Identity. */ - clientId?: string; -} - -/** The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. */ -export interface KustomizationDefinition { - /** - * Name of the Kustomization, matching the key in the Kustomizations object map. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** The path in the source reference to reconcile on the cluster. */ - path?: string; - /** Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies have completed their reconciliation. */ - dependsOn?: string[]; - /** The maximum time to attempt to reconcile the Kustomization on the cluster. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the Kustomization on the cluster. */ - syncIntervalInSeconds?: number; - /** The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. */ - retryIntervalInSeconds?: number; - /** Enable/disable garbage collections of Kubernetes objects created by this Kustomization. */ - prune?: boolean; - /** Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. */ - force?: boolean; - /** Enable/disable health check for all Kubernetes objects created by this Kustomization. */ - wait?: boolean; - /** Used for variable substitution for this Kustomization after kustomize build. */ - postBuild?: PostBuildDefinition; -} - -/** The postBuild definitions defining variable substitutions for this Kustomization after kustomize build. */ -export interface PostBuildDefinition { - /** Key/value pairs holding the variables to be substituted in this Kustomization. */ - substitute?: { [propertyName: string]: string }; - /** Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization. */ - substituteFrom?: (SubstituteFromDefinition | null)[]; -} - -/** Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization. */ -export interface SubstituteFromDefinition { - /** Define whether it is ConfigMap or Secret that holds the variables to be used in substitution. */ - kind?: string; - /** Name of the ConfigMap/Secret that holds the variables to be used in substitution. */ - name?: string; - /** Set to True to proceed without ConfigMap/Secret, if it is not present. */ - optional?: boolean; -} - -/** Statuses of objects deployed by the user-specified kustomizations from the git repository. */ -export interface ObjectStatusDefinition { - /** Name of the applied object */ - name?: string; - /** Namespace of the applied object */ - namespace?: string; - /** Kind of the applied object */ - kind?: string; - /** Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster. */ - complianceState?: FluxComplianceState; - /** Object reference to the Kustomization that applied this object */ - appliedBy?: ObjectReferenceDefinition; - /** List of Kubernetes object status conditions present on the cluster */ - statusConditions?: ObjectStatusConditionDefinition[]; - /** Additional properties that are provided from objects of the HelmRelease kind */ - helmReleaseProperties?: HelmReleasePropertiesDefinition; -} - -/** Object reference to a Kubernetes object on a cluster */ -export interface ObjectReferenceDefinition { - /** Name of the object */ - name?: string; - /** Namespace of the object */ - namespace?: string; -} - -/** Status condition of Kubernetes object */ -export interface ObjectStatusConditionDefinition { - /** Last time this status condition has changed */ - lastTransitionTime?: Date; - /** A more verbose description of the object status condition */ - message?: string; - /** Reason for the specified status condition type status */ - reason?: string; - /** Status of the Kubernetes object condition type */ - status?: string; - /** Object status condition type for this object */ - type?: string; -} - -/** Properties for HelmRelease objects */ -export interface HelmReleasePropertiesDefinition { - /** The revision number of the last released object change */ - lastRevisionApplied?: number; - /** The reference to the HelmChart object used as the source to this HelmRelease */ - helmChartRef?: ObjectReferenceDefinition; - /** Total number of times that the HelmRelease failed to install or upgrade */ - failureCount?: number; - /** Number of times that the HelmRelease failed to install */ - installFailureCount?: number; - /** Number of times that the HelmRelease failed to upgrade */ - upgradeFailureCount?: number; -} - -/** The Flux Configuration Patch Request object. */ -export interface FluxConfigurationPatch { - /** Source Kind to pull the configuration data from. */ - sourceKind?: SourceKindType; - /** Whether this configuration should suspend its reconciliation of its kustomizations and sources. */ - suspend?: boolean; - /** Parameters to reconcile to the GitRepository source kind type. */ - gitRepository?: GitRepositoryPatchDefinition; - /** Parameters to reconcile to the Bucket source kind type. */ - bucket?: BucketPatchDefinition; - /** Parameters to reconcile to the AzureBlob source kind type. */ - azureBlob?: AzureBlobPatchDefinition; - /** Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. */ - kustomizations?: { - [propertyName: string]: KustomizationPatchDefinition | null; - }; - /** Key-value pairs of protected configuration settings for the configuration */ - configurationProtectedSettings?: { [propertyName: string]: string }; -} - -/** Parameters to reconcile to the GitRepository source kind type. */ -export interface GitRepositoryPatchDefinition { - /** The URL to sync for the flux configuration git repository. */ - url?: string; - /** The maximum time to attempt to reconcile the cluster git repository source with the remote. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the cluster git repository source with the remote. */ - syncIntervalInSeconds?: number; - /** The source reference for the GitRepository object. */ - repositoryRef?: RepositoryRefDefinition; - /** Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH */ - sshKnownHosts?: string; - /** Plaintext HTTPS username used to access private git repositories over HTTPS */ - httpsUser?: string; - /** Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS */ - httpsCACert?: string; - /** Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. */ - localAuthRef?: string; -} - -/** Parameters to reconcile to the Bucket source kind type. */ -export interface BucketPatchDefinition { - /** The URL to sync for the flux configuration S3 bucket. */ - url?: string; - /** The bucket name to sync from the url endpoint for the flux configuration. */ - bucketName?: string; - /** Specify whether to use insecure communication when puling data from the S3 bucket. */ - insecure?: boolean; - /** The maximum time to attempt to reconcile the cluster bucket source with the remote. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the cluster bucket source with the remote. */ - syncIntervalInSeconds?: number; - /** Plaintext access key used to securely access the S3 bucket */ - accessKey?: string; - /** Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. */ - localAuthRef?: string; -} - -/** Parameters to reconcile to the AzureBlob source kind type. */ -export interface AzureBlobPatchDefinition { - /** The URL to sync for the flux configuration Azure Blob storage account. */ - url?: string; - /** The Azure Blob container name to sync from the url endpoint for the flux configuration. */ - containerName?: string; - /** The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the cluster Azure Blob source with the remote. */ - syncIntervalInSeconds?: number; - /** Parameters to authenticate using Service Principal. */ - servicePrincipal?: ServicePrincipalPatchDefinition; - /** The account key (shared key) to access the storage account */ - accountKey?: string; - /** The Shared Access token to access the storage container */ - sasToken?: string; - /** Parameters to authenticate using a Managed Identity. */ - managedIdentity?: ManagedIdentityPatchDefinition; - /** Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. */ - localAuthRef?: string; -} - -/** Parameters to authenticate using Service Principal. */ -export interface ServicePrincipalPatchDefinition { - /** The client Id for authenticating a Service Principal. */ - clientId?: string; - /** The tenant Id for authenticating a Service Principal */ - tenantId?: string; - /** The client secret for authenticating a Service Principal */ - clientSecret?: string; - /** Base64-encoded certificate used to authenticate a Service Principal */ - clientCertificate?: string; - /** The password for the certificate used to authenticate a Service Principal */ - clientCertificatePassword?: string; - /** Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the Client Certificate */ - clientCertificateSendChain?: boolean; -} - -/** Parameters to authenticate using a Managed Identity. */ -export interface ManagedIdentityPatchDefinition { - /** The client Id for authenticating a Managed Identity. */ - clientId?: string; -} - -/** The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. */ -export interface KustomizationPatchDefinition { - /** The path in the source reference to reconcile on the cluster. */ - path?: string; - /** Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies have completed their reconciliation. */ - dependsOn?: string[]; - /** The maximum time to attempt to reconcile the Kustomization on the cluster. */ - timeoutInSeconds?: number; - /** The interval at which to re-reconcile the Kustomization on the cluster. */ - syncIntervalInSeconds?: number; - /** The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. */ - retryIntervalInSeconds?: number; - /** Enable/disable garbage collections of Kubernetes objects created by this Kustomization. */ - prune?: boolean; - /** Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. */ - force?: boolean; - /** Enable/disable health check for all Kubernetes objects created by this Kustomization. */ - wait?: boolean; - /** Used for variable substitution for this Kustomization after kustomize build. */ - postBuild?: PostBuildDefinition; -} - -/** Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get the next set of results. */ -export interface FluxConfigurationsList { - /** - * List of Flux Configurations within a Kubernetes cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: FluxConfiguration[]; - /** - * URL to get the next set of configuration objects, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Properties for Helm operator. */ -export interface HelmOperatorProperties { - /** Version of the operator Helm chart. */ - chartVersion?: string; - /** Values override for the operator Helm chart. */ - chartValues?: string; -} - -/** Compliance Status details */ -export interface ComplianceStatus { - /** - * The compliance state of the configuration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly complianceState?: ComplianceStateType; - /** Datetime the configuration was last applied. */ - lastConfigApplied?: Date; - /** Message from when the configuration was applied. */ - message?: string; - /** Level of the message. */ - messageLevel?: MessageLevelType; -} - -/** 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. */ -export interface SourceControlConfigurationList { - /** - * List of Source Control Configurations within a Kubernetes cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: SourceControlConfiguration[]; - /** - * URL to get the next set of configuration objects, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** The async operations in progress, in the cluster. */ -export interface OperationStatusList { - /** - * List of async operations in progress, in the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: OperationStatusResult[]; - /** - * 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; -} - -/** Result of the request to list operations. */ -export interface ResourceProviderOperationList { - /** List of operations supported by this resource provider. */ - value?: ResourceProviderOperation[]; - /** - * URL to the next set of results, if any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Supported operation of this resource provider. */ -export interface ResourceProviderOperation { - /** Operation name, in format of {provider}/{resource}/{operation} */ - name?: string; - /** Display metadata associated with the operation. */ - display?: ResourceProviderOperationDisplay; - /** - * The flag that indicates whether the operation applies to data plane. - * 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; -} - -/** Display metadata associated with the operation. */ -export interface ResourceProviderOperationDisplay { - /** Resource provider: Microsoft KubernetesConfiguration. */ - provider?: string; - /** Resource on which the operation is performed. */ - resource?: string; - /** Type of operation: get, read, delete, etc. */ - operation?: string; - /** Description of this operation. */ - description?: string; -} - /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} @@ -704,121 +281,6 @@ export interface Extension extends ProxyResource { readonly isSystemExtension?: boolean; } -/** The Flux Configuration object returned in Get & Put response. */ -export interface FluxConfiguration extends ProxyResource { - /** - * 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 - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** Scope at which the operator will be installed. */ - scope?: ScopeType; - /** The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only. */ - namespace?: string; - /** Source Kind to pull the configuration data from. */ - sourceKind?: SourceKindType; - /** Whether this configuration should suspend its reconciliation of its kustomizations and sources. */ - suspend?: boolean; - /** Parameters to reconcile to the GitRepository source kind type. */ - gitRepository?: GitRepositoryDefinition; - /** Parameters to reconcile to the Bucket source kind type. */ - bucket?: BucketDefinition; - /** Parameters to reconcile to the AzureBlob source kind type. */ - azureBlob?: AzureBlobDefinition; - /** Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. */ - kustomizations?: { [propertyName: string]: KustomizationDefinition | null }; - /** Key-value pairs of protected configuration settings for the configuration */ - configurationProtectedSettings?: { [propertyName: string]: string }; - /** - * Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned by the fluxConfiguration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statuses?: (ObjectStatusDefinition | null)[]; - /** - * Public Key associated with this fluxConfiguration (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; - /** - * Branch and/or SHA of the source commit synced with the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourceSyncedCommitId?: string; - /** - * Datetime the fluxConfiguration synced its source on the cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sourceUpdatedAt?: Date; - /** - * Datetime the fluxConfiguration synced its status on the cluster with Azure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusUpdatedAt?: Date; - /** Whether flux configuration deployment should wait for cluster to reconcile the kustomizations. */ - waitForReconciliation?: boolean; - /** Maximum duration to wait for flux configuration reconciliation. E.g PT1H, PT5M, P1D */ - reconciliationWaitDuration?: string; - /** - * Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly complianceState?: FluxComplianceState; - /** - * Status of the creation of the fluxConfiguration. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ProvisioningState; - /** - * Error message returned to the user in the case of provisioning failure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errorMessage?: string; -} - -/** The SourceControl Configuration object returned in Get & Put response. */ -export interface SourceControlConfiguration extends ProxyResource { - /** - * 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 - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** 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. */ - operatorNamespace?: string; - /** Instance name of the operator - identifying the specific configuration. */ - operatorInstanceName?: string; - /** Type of the operator */ - 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. */ - 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; - /** Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances */ - sshKnownHostsContents?: string; - /** Option to enable Helm Operator for this git configuration. */ - enableHelmOperator?: boolean; - /** Properties for Helm operator. */ - helmOperatorProperties?: HelmOperatorProperties; - /** - * The provisioning state of the resource provider. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - 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; -} - /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { /** Succeeded */ @@ -832,7 +294,7 @@ export enum KnownProvisioningState { /** Updating */ Updating = "Updating", /** Deleting */ - Deleting = "Deleting" + Deleting = "Deleting", } /** @@ -856,7 +318,7 @@ export enum KnownLevelType { /** Warning */ Warning = "Warning", /** Information */ - Information = "Information" + Information = "Information", } /** @@ -879,7 +341,7 @@ export enum KnownCreatedByType { /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", /** Key */ - Key = "Key" + Key = "Key", } /** @@ -893,201 +355,6 @@ export enum KnownCreatedByType { * **Key** */ export type CreatedByType = string; - -/** Known values of {@link ScopeType} that the service accepts. */ -export enum KnownScopeType { - /** Cluster */ - Cluster = "cluster", - /** Namespace */ - Namespace = "namespace" -} - -/** - * Defines values for ScopeType. \ - * {@link KnownScopeType} can be used interchangeably with ScopeType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **cluster** \ - * **namespace** - */ -export type ScopeType = string; - -/** Known values of {@link SourceKindType} that the service accepts. */ -export enum KnownSourceKindType { - /** GitRepository */ - GitRepository = "GitRepository", - /** Bucket */ - Bucket = "Bucket", - /** AzureBlob */ - AzureBlob = "AzureBlob" -} - -/** - * Defines values for SourceKindType. \ - * {@link KnownSourceKindType} can be used interchangeably with SourceKindType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GitRepository** \ - * **Bucket** \ - * **AzureBlob** - */ -export type SourceKindType = string; - -/** Known values of {@link FluxComplianceState} that the service accepts. */ -export enum KnownFluxComplianceState { - /** Compliant */ - Compliant = "Compliant", - /** NonCompliant */ - NonCompliant = "Non-Compliant", - /** Pending */ - Pending = "Pending", - /** Suspended */ - Suspended = "Suspended", - /** Unknown */ - Unknown = "Unknown" -} - -/** - * Defines values for FluxComplianceState. \ - * {@link KnownFluxComplianceState} can be used interchangeably with FluxComplianceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Compliant** \ - * **Non-Compliant** \ - * **Pending** \ - * **Suspended** \ - * **Unknown** - */ -export type FluxComplianceState = string; - -/** Known values of {@link OperatorType} that the service accepts. */ -export enum KnownOperatorType { - /** Flux */ - Flux = "Flux" -} - -/** - * Defines values for OperatorType. \ - * {@link KnownOperatorType} can be used interchangeably with OperatorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Flux** - */ -export type OperatorType = string; - -/** Known values of {@link OperatorScopeType} that the service accepts. */ -export enum KnownOperatorScopeType { - /** Cluster */ - Cluster = "cluster", - /** Namespace */ - Namespace = "namespace" -} - -/** - * Defines values for OperatorScopeType. \ - * {@link KnownOperatorScopeType} can be used interchangeably with OperatorScopeType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **cluster** \ - * **namespace** - */ -export type OperatorScopeType = string; - -/** Known values of {@link ProvisioningStateType} that the service accepts. */ -export enum KnownProvisioningStateType { - /** Accepted */ - Accepted = "Accepted", - /** Deleting */ - Deleting = "Deleting", - /** Running */ - Running = "Running", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed" -} - -/** - * Defines values for ProvisioningStateType. \ - * {@link KnownProvisioningStateType} can be used interchangeably with ProvisioningStateType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Accepted** \ - * **Deleting** \ - * **Running** \ - * **Succeeded** \ - * **Failed** - */ -export type ProvisioningStateType = string; - -/** Known values of {@link ComplianceStateType} that the service accepts. */ -export enum KnownComplianceStateType { - /** Pending */ - Pending = "Pending", - /** Compliant */ - Compliant = "Compliant", - /** Noncompliant */ - Noncompliant = "Noncompliant", - /** Installed */ - Installed = "Installed", - /** Failed */ - Failed = "Failed" -} - -/** - * Defines values for ComplianceStateType. \ - * {@link KnownComplianceStateType} can be used interchangeably with ComplianceStateType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pending** \ - * **Compliant** \ - * **Noncompliant** \ - * **Installed** \ - * **Failed** - */ -export type ComplianceStateType = string; - -/** Known values of {@link MessageLevelType} that the service accepts. */ -export enum KnownMessageLevelType { - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning", - /** Information */ - Information = "Information" -} - -/** - * Defines values for MessageLevelType. \ - * {@link KnownMessageLevelType} can be used interchangeably with MessageLevelType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Error** \ - * **Warning** \ - * **Information** - */ -export type MessageLevelType = string; - -/** Known values of {@link KustomizationValidationType} that the service accepts. */ -export enum KnownKustomizationValidationType { - /** None */ - None = "none", - /** Client */ - Client = "client", - /** Server */ - Server = "server" -} - -/** - * Defines values for KustomizationValidationType. \ - * {@link KnownKustomizationValidationType} can be used interchangeably with KustomizationValidationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **none** \ - * **client** \ - * **server** - */ -export type KustomizationValidationType = string; /** Defines values for AKSIdentityType. */ export type AKSIdentityType = "SystemAssigned" | "UserAssigned"; @@ -1155,135 +422,7 @@ export interface OperationStatusGetOptionalParams export type OperationStatusGetResponse = OperationStatusResult; /** Optional parameters. */ -export interface OperationStatusListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationStatusListResponse = OperationStatusList; - -/** Optional parameters. */ -export interface OperationStatusListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationStatusListNextResponse = OperationStatusList; - -/** Optional parameters. */ -export interface FluxConfigurationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type FluxConfigurationsGetResponse = FluxConfiguration; - -/** Optional parameters. */ -export interface FluxConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type FluxConfigurationsCreateOrUpdateResponse = FluxConfiguration; - -/** Optional parameters. */ -export interface FluxConfigurationsUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type FluxConfigurationsUpdateResponse = FluxConfiguration; - -/** Optional parameters. */ -export interface FluxConfigurationsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delete the extension resource in Azure - not the normal asynchronous delete. */ - forceDelete?: boolean; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface FluxConfigurationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type FluxConfigurationsListResponse = FluxConfigurationsList; - -/** Optional parameters. */ -export interface FluxConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type FluxConfigurationsListNextResponse = FluxConfigurationsList; - -/** Optional parameters. */ -export interface FluxConfigOperationStatusGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type FluxConfigOperationStatusGetResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface SourceControlConfigurationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SourceControlConfigurationsGetResponse = SourceControlConfiguration; - -/** Optional parameters. */ -export interface SourceControlConfigurationsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SourceControlConfigurationsCreateOrUpdateResponse = SourceControlConfiguration; - -/** Optional parameters. */ -export interface SourceControlConfigurationsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface SourceControlConfigurationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SourceControlConfigurationsListResponse = SourceControlConfigurationList; - -/** Optional parameters. */ -export interface SourceControlConfigurationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SourceControlConfigurationsListNextResponse = SourceControlConfigurationList; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = ResourceProviderOperationList; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = ResourceProviderOperationList; - -/** Optional parameters. */ -export interface SourceControlConfigurationClientOptionalParams +export interface ExtensionsClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts index 66987873b539..139e37130ea0 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/mappers.ts @@ -17,18 +17,18 @@ export const Scope: coreClient.CompositeMapper = { serializedName: "cluster", type: { name: "Composite", - className: "ScopeCluster" - } + className: "ScopeCluster", + }, }, namespace: { serializedName: "namespace", type: { name: "Composite", - className: "ScopeNamespace" - } - } - } - } + className: "ScopeNamespace", + }, + }, + }, + }, }; export const ScopeCluster: coreClient.CompositeMapper = { @@ -39,11 +39,11 @@ export const ScopeCluster: coreClient.CompositeMapper = { releaseNamespace: { serializedName: "releaseNamespace", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ScopeNamespace: coreClient.CompositeMapper = { @@ -54,11 +54,11 @@ export const ScopeNamespace: coreClient.CompositeMapper = { targetNamespace: { serializedName: "targetNamespace", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ExtensionStatus: coreClient.CompositeMapper = { @@ -69,36 +69,36 @@ export const ExtensionStatus: coreClient.CompositeMapper = { code: { serializedName: "code", type: { - name: "String" - } + name: "String", + }, }, displayStatus: { serializedName: "displayStatus", type: { - name: "String" - } + name: "String", + }, }, level: { defaultValue: "Information", serializedName: "level", type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, time: { serializedName: "time", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ErrorDetail: coreClient.CompositeMapper = { @@ -110,22 +110,22 @@ export const ErrorDetail: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -135,10 +135,10 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorDetail" - } - } - } + className: "ErrorDetail", + }, + }, + }, }, additionalInfo: { serializedName: "additionalInfo", @@ -148,13 +148,13 @@ export const ErrorDetail: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const ErrorAdditionalInfo: coreClient.CompositeMapper = { @@ -166,50 +166,51 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, info: { serializedName: "info", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } -}; - -export const ExtensionPropertiesAksAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtensionPropertiesAksAssignedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: ["SystemAssigned", "UserAssigned"] - } - } - } - } -}; + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; + +export const ExtensionPropertiesAksAssignedIdentity: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ExtensionPropertiesAksAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String", + }, + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: ["SystemAssigned", "UserAssigned"], + }, + }, + }, + }, + }; export const Identity: coreClient.CompositeMapper = { type: { @@ -220,26 +221,26 @@ export const Identity: coreClient.CompositeMapper = { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, tenantId: { serializedName: "tenantId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { defaultValue: "SystemAssigned", isConstant: true, serializedName: "type", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SystemData: coreClient.CompositeMapper = { @@ -250,41 +251,41 @@ export const SystemData: coreClient.CompositeMapper = { createdBy: { serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, createdByType: { serializedName: "createdByType", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "createdAt", type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastModifiedBy: { serializedName: "lastModifiedBy", type: { - name: "String" - } + name: "String", + }, }, lastModifiedByType: { serializedName: "lastModifiedByType", type: { - name: "String" - } + name: "String", + }, }, lastModifiedAt: { serializedName: "lastModifiedAt", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const Plan: coreClient.CompositeMapper = { @@ -296,37 +297,37 @@ export const Plan: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, publisher: { serializedName: "publisher", required: true, type: { - name: "String" - } + name: "String", + }, }, product: { serializedName: "product", required: true, type: { - name: "String" - } + name: "String", + }, }, promotionCode: { serializedName: "promotionCode", type: { - name: "String" - } + name: "String", + }, }, version: { serializedName: "version", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -338,25 +339,25 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ErrorResponse: coreClient.CompositeMapper = { @@ -368,11 +369,11 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDetail" - } - } - } - } + className: "ErrorDetail", + }, + }, + }, + }, }; export const PatchExtension: coreClient.CompositeMapper = { @@ -384,41 +385,41 @@ export const PatchExtension: coreClient.CompositeMapper = { defaultValue: true, serializedName: "properties.autoUpgradeMinorVersion", type: { - name: "Boolean" - } + name: "Boolean", + }, }, releaseTrain: { defaultValue: "Stable", serializedName: "properties.releaseTrain", type: { - name: "String" - } + name: "String", + }, }, version: { serializedName: "properties.version", nullable: true, type: { - name: "String" - } + name: "String", + }, }, configurationSettings: { serializedName: "properties.configurationSettings", nullable: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, configurationProtectedSettings: { serializedName: "properties.configurationProtectedSettings", nullable: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + value: { type: { name: "String" } }, + }, + }, + }, + }, }; export const ExtensionsList: coreClient.CompositeMapper = { @@ -434,20 +435,20 @@ export const ExtensionsList: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Extension" - } - } - } + className: "Extension", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationStatusResult: coreClient.CompositeMapper = { @@ -458,1717 +459,195 @@ export const OperationStatusResult: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", required: true, type: { - name: "String" - } + name: "String", + }, }, properties: { serializedName: "properties", nullable: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, error: { serializedName: "error", type: { name: "Composite", - className: "ErrorDetail" - } - } - } - } -}; - -export const GitRepositoryDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GitRepositoryDefinition", - modelProperties: { - url: { - serializedName: "url", - nullable: true, - type: { - name: "String" - } - }, - timeoutInSeconds: { - defaultValue: 600, - serializedName: "timeoutInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - syncIntervalInSeconds: { - defaultValue: 600, - serializedName: "syncIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - repositoryRef: { - serializedName: "repositoryRef", - type: { - name: "Composite", - className: "RepositoryRefDefinition" - } - }, - sshKnownHosts: { - serializedName: "sshKnownHosts", - nullable: true, - type: { - name: "String" - } - }, - httpsUser: { - serializedName: "httpsUser", - nullable: true, - type: { - name: "String" - } - }, - httpsCACert: { - serializedName: "httpsCACert", - nullable: true, - type: { - name: "String" - } - }, - localAuthRef: { - serializedName: "localAuthRef", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const RepositoryRefDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RepositoryRefDefinition", - modelProperties: { - branch: { - serializedName: "branch", - nullable: true, - type: { - name: "String" - } - }, - tag: { - serializedName: "tag", - nullable: true, - type: { - name: "String" - } - }, - semver: { - serializedName: "semver", - nullable: true, - type: { - name: "String" - } + className: "ErrorDetail", + }, }, - commit: { - serializedName: "commit", - nullable: true, - type: { - name: "String" - } - } - } - } + }, + }, }; -export const BucketDefinition: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BucketDefinition", + className: "ProxyResource", modelProperties: { - url: { - serializedName: "url", - type: { - name: "String" - } - }, - bucketName: { - serializedName: "bucketName", - type: { - name: "String" - } - }, - insecure: { - defaultValue: true, - serializedName: "insecure", - type: { - name: "Boolean" - } - }, - timeoutInSeconds: { - defaultValue: 600, - serializedName: "timeoutInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - syncIntervalInSeconds: { - defaultValue: 600, - serializedName: "syncIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - accessKey: { - serializedName: "accessKey", - nullable: true, - type: { - name: "String" - } - }, - localAuthRef: { - serializedName: "localAuthRef", - nullable: true, - type: { - name: "String" - } - } - } - } + ...Resource.type.modelProperties, + }, + }, }; -export const AzureBlobDefinition: coreClient.CompositeMapper = { +export const Extension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureBlobDefinition", + className: "Extension", modelProperties: { - url: { - serializedName: "url", - nullable: true, - type: { - name: "String" - } - }, - containerName: { - serializedName: "containerName", - nullable: true, - type: { - name: "String" - } - }, - timeoutInSeconds: { - defaultValue: 600, - serializedName: "timeoutInSeconds", - nullable: true, + ...ProxyResource.type.modelProperties, + identity: { + serializedName: "identity", type: { - name: "Number" - } + name: "Composite", + className: "Identity", + }, }, - syncIntervalInSeconds: { - defaultValue: 600, - serializedName: "syncIntervalInSeconds", - nullable: true, + systemData: { + serializedName: "systemData", type: { - name: "Number" - } + name: "Composite", + className: "SystemData", + }, }, - servicePrincipal: { - serializedName: "servicePrincipal", + plan: { + serializedName: "plan", type: { name: "Composite", - className: "ServicePrincipalDefinition" - } + className: "Plan", + }, }, - accountKey: { - serializedName: "accountKey", - nullable: true, + extensionType: { + serializedName: "properties.extensionType", type: { - name: "String" - } + name: "String", + }, }, - sasToken: { - serializedName: "sasToken", - nullable: true, + autoUpgradeMinorVersion: { + defaultValue: true, + serializedName: "properties.autoUpgradeMinorVersion", type: { - name: "String" - } + name: "Boolean", + }, }, - managedIdentity: { - serializedName: "managedIdentity", + releaseTrain: { + defaultValue: "Stable", + serializedName: "properties.releaseTrain", type: { - name: "Composite", - className: "ManagedIdentityDefinition" - } + name: "String", + }, }, - localAuthRef: { - serializedName: "localAuthRef", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const ServicePrincipalDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServicePrincipalDefinition", - modelProperties: { - clientId: { - serializedName: "clientId", + version: { + serializedName: "properties.version", nullable: true, type: { - name: "String" - } + name: "String", + }, }, - tenantId: { - serializedName: "tenantId", - nullable: true, + scope: { + serializedName: "properties.scope", type: { - name: "String" - } + name: "Composite", + className: "Scope", + }, }, - clientSecret: { - serializedName: "clientSecret", + configurationSettings: { + serializedName: "properties.configurationSettings", nullable: true, type: { - name: "String" - } + name: "Dictionary", + value: { type: { name: "String" } }, + }, }, - clientCertificate: { - serializedName: "clientCertificate", + configurationProtectedSettings: { + serializedName: "properties.configurationProtectedSettings", nullable: true, type: { - name: "String" - } + name: "Dictionary", + value: { type: { name: "String" } }, + }, }, - clientCertificatePassword: { - serializedName: "clientCertificatePassword", + currentVersion: { + serializedName: "properties.currentVersion", + readOnly: true, nullable: true, type: { - name: "String" - } + name: "String", + }, }, - clientCertificateSendChain: { - defaultValue: false, - serializedName: "clientCertificateSendChain", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ManagedIdentityDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedIdentityDefinition", - modelProperties: { - clientId: { - serializedName: "clientId", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const KustomizationDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KustomizationDefinition", - modelProperties: { - name: { - serializedName: "name", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } - }, - path: { - defaultValue: "", - serializedName: "path", - type: { - name: "String" - } + name: "String", + }, }, - dependsOn: { - serializedName: "dependsOn", + statuses: { + serializedName: "properties.statuses", nullable: true, type: { name: "Sequence", element: { type: { - name: "String" - } - } - } - }, - timeoutInSeconds: { - defaultValue: 600, - serializedName: "timeoutInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - syncIntervalInSeconds: { - defaultValue: 600, - serializedName: "syncIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - retryIntervalInSeconds: { - serializedName: "retryIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - prune: { - defaultValue: false, - serializedName: "prune", - type: { - name: "Boolean" - } - }, - force: { - defaultValue: false, - serializedName: "force", - type: { - name: "Boolean" - } - }, - wait: { - defaultValue: true, - serializedName: "wait", - type: { - name: "Boolean" - } + name: "Composite", + className: "ExtensionStatus", + }, + }, + }, }, - postBuild: { - serializedName: "postBuild", + errorInfo: { + serializedName: "properties.errorInfo", type: { name: "Composite", - className: "PostBuildDefinition" - } - } - } - } -}; - -export const PostBuildDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PostBuildDefinition", - modelProperties: { - substitute: { - serializedName: "substitute", + className: "ErrorDetail", + }, + }, + customLocationSettings: { + serializedName: "properties.customLocationSettings", + readOnly: true, nullable: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, - substituteFrom: { - serializedName: "substituteFrom", + packageUri: { + serializedName: "properties.packageUri", + readOnly: true, nullable: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SubstituteFromDefinition" - } - } - } - } - } - } -}; - -export const SubstituteFromDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SubstituteFromDefinition", - modelProperties: { - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - optional: { - defaultValue: false, - serializedName: "optional", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ObjectStatusDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ObjectStatusDefinition", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - namespace: { - serializedName: "namespace", - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - type: { - name: "String" - } - }, - complianceState: { - defaultValue: "Unknown", - serializedName: "complianceState", - type: { - name: "String" - } + name: "String", + }, }, - appliedBy: { - serializedName: "appliedBy", + aksAssignedIdentity: { + serializedName: "properties.aksAssignedIdentity", type: { name: "Composite", - className: "ObjectReferenceDefinition" - } + className: "ExtensionPropertiesAksAssignedIdentity", + }, }, - statusConditions: { - serializedName: "statusConditions", - nullable: true, + isSystemExtension: { + defaultValue: false, + serializedName: "properties.isSystemExtension", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ObjectStatusConditionDefinition" - } - } - } + name: "Boolean", + }, }, - helmReleaseProperties: { - serializedName: "helmReleaseProperties", - type: { - name: "Composite", - className: "HelmReleasePropertiesDefinition" - } - } - } - } -}; - -export const ObjectReferenceDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ObjectReferenceDefinition", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - namespace: { - serializedName: "namespace", - type: { - name: "String" - } - } - } - } -}; - -export const ObjectStatusConditionDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ObjectStatusConditionDefinition", - modelProperties: { - lastTransitionTime: { - serializedName: "lastTransitionTime", - type: { - name: "DateTime" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - reason: { - serializedName: "reason", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const HelmReleasePropertiesDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HelmReleasePropertiesDefinition", - modelProperties: { - lastRevisionApplied: { - serializedName: "lastRevisionApplied", - nullable: true, - type: { - name: "Number" - } - }, - helmChartRef: { - serializedName: "helmChartRef", - type: { - name: "Composite", - className: "ObjectReferenceDefinition" - } - }, - failureCount: { - serializedName: "failureCount", - nullable: true, - type: { - name: "Number" - } - }, - installFailureCount: { - serializedName: "installFailureCount", - nullable: true, - type: { - name: "Number" - } - }, - upgradeFailureCount: { - serializedName: "upgradeFailureCount", - nullable: true, - type: { - name: "Number" - } - } - } - } -}; - -export const FluxConfigurationPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FluxConfigurationPatch", - modelProperties: { - sourceKind: { - serializedName: "properties.sourceKind", - nullable: true, - type: { - name: "String" - } - }, - suspend: { - serializedName: "properties.suspend", - nullable: true, - type: { - name: "Boolean" - } - }, - gitRepository: { - serializedName: "properties.gitRepository", - type: { - name: "Composite", - className: "GitRepositoryPatchDefinition" - } - }, - bucket: { - serializedName: "properties.bucket", - type: { - name: "Composite", - className: "BucketPatchDefinition" - } - }, - azureBlob: { - serializedName: "properties.azureBlob", - type: { - name: "Composite", - className: "AzureBlobPatchDefinition" - } - }, - kustomizations: { - serializedName: "properties.kustomizations", - nullable: true, - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "KustomizationPatchDefinition" - } - } - } - }, - configurationProtectedSettings: { - serializedName: "properties.configurationProtectedSettings", - nullable: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const GitRepositoryPatchDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GitRepositoryPatchDefinition", - modelProperties: { - url: { - serializedName: "url", - nullable: true, - type: { - name: "String" - } - }, - timeoutInSeconds: { - serializedName: "timeoutInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - syncIntervalInSeconds: { - serializedName: "syncIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - repositoryRef: { - serializedName: "repositoryRef", - type: { - name: "Composite", - className: "RepositoryRefDefinition" - } - }, - sshKnownHosts: { - serializedName: "sshKnownHosts", - nullable: true, - type: { - name: "String" - } - }, - httpsUser: { - serializedName: "httpsUser", - nullable: true, - type: { - name: "String" - } - }, - httpsCACert: { - serializedName: "httpsCACert", - nullable: true, - type: { - name: "String" - } - }, - localAuthRef: { - serializedName: "localAuthRef", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const BucketPatchDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BucketPatchDefinition", - modelProperties: { - url: { - serializedName: "url", - nullable: true, - type: { - name: "String" - } - }, - bucketName: { - serializedName: "bucketName", - nullable: true, - type: { - name: "String" - } - }, - insecure: { - serializedName: "insecure", - nullable: true, - type: { - name: "Boolean" - } - }, - timeoutInSeconds: { - serializedName: "timeoutInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - syncIntervalInSeconds: { - serializedName: "syncIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - accessKey: { - serializedName: "accessKey", - nullable: true, - type: { - name: "String" - } - }, - localAuthRef: { - serializedName: "localAuthRef", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const AzureBlobPatchDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureBlobPatchDefinition", - modelProperties: { - url: { - serializedName: "url", - nullable: true, - type: { - name: "String" - } - }, - containerName: { - serializedName: "containerName", - nullable: true, - type: { - name: "String" - } - }, - timeoutInSeconds: { - serializedName: "timeoutInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - syncIntervalInSeconds: { - serializedName: "syncIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - servicePrincipal: { - serializedName: "servicePrincipal", - type: { - name: "Composite", - className: "ServicePrincipalPatchDefinition" - } - }, - accountKey: { - serializedName: "accountKey", - nullable: true, - type: { - name: "String" - } - }, - sasToken: { - serializedName: "sasToken", - nullable: true, - type: { - name: "String" - } - }, - managedIdentity: { - serializedName: "managedIdentity", - type: { - name: "Composite", - className: "ManagedIdentityPatchDefinition" - } - }, - localAuthRef: { - serializedName: "localAuthRef", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const ServicePrincipalPatchDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServicePrincipalPatchDefinition", - modelProperties: { - clientId: { - serializedName: "clientId", - nullable: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - nullable: true, - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "clientSecret", - nullable: true, - type: { - name: "String" - } - }, - clientCertificate: { - serializedName: "clientCertificate", - nullable: true, - type: { - name: "String" - } - }, - clientCertificatePassword: { - serializedName: "clientCertificatePassword", - nullable: true, - type: { - name: "String" - } - }, - clientCertificateSendChain: { - serializedName: "clientCertificateSendChain", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ManagedIdentityPatchDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedIdentityPatchDefinition", - modelProperties: { - clientId: { - serializedName: "clientId", - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const KustomizationPatchDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KustomizationPatchDefinition", - modelProperties: { - path: { - serializedName: "path", - nullable: true, - type: { - name: "String" - } - }, - dependsOn: { - serializedName: "dependsOn", - nullable: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - timeoutInSeconds: { - serializedName: "timeoutInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - syncIntervalInSeconds: { - serializedName: "syncIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - retryIntervalInSeconds: { - serializedName: "retryIntervalInSeconds", - nullable: true, - type: { - name: "Number" - } - }, - prune: { - serializedName: "prune", - nullable: true, - type: { - name: "Boolean" - } - }, - force: { - serializedName: "force", - nullable: true, - type: { - name: "Boolean" - } - }, - wait: { - serializedName: "wait", - nullable: true, - type: { - name: "Boolean" - } - }, - postBuild: { - serializedName: "postBuild", - type: { - name: "Composite", - className: "PostBuildDefinition" - } - } - } - } -}; - -export const FluxConfigurationsList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FluxConfigurationsList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FluxConfiguration" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const HelmOperatorProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HelmOperatorProperties", - modelProperties: { - chartVersion: { - serializedName: "chartVersion", - type: { - name: "String" - } - }, - chartValues: { - serializedName: "chartValues", - type: { - name: "String" - } - } - } - } -}; - -export const ComplianceStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ComplianceStatus", - modelProperties: { - complianceState: { - serializedName: "complianceState", - readOnly: true, - type: { - name: "String" - } - }, - lastConfigApplied: { - serializedName: "lastConfigApplied", - type: { - name: "DateTime" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - }, - messageLevel: { - serializedName: "messageLevel", - type: { - name: "String" - } - } - } - } -}; - -export const SourceControlConfigurationList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SourceControlConfigurationList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SourceControlConfiguration" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationStatusList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationStatusList", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationStatusResult" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ResourceProviderOperationList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceProviderOperationList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceProviderOperation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ResourceProviderOperation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceProviderOperation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "ResourceProviderOperationDisplay" - } - }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean" - } - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ResourceProviderOperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceProviderOperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const Extension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Extension", - modelProperties: { - ...ProxyResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - plan: { - serializedName: "plan", - type: { - name: "Composite", - className: "Plan" - } - }, - extensionType: { - serializedName: "properties.extensionType", - type: { - name: "String" - } - }, - autoUpgradeMinorVersion: { - defaultValue: true, - serializedName: "properties.autoUpgradeMinorVersion", - type: { - name: "Boolean" - } - }, - releaseTrain: { - defaultValue: "Stable", - serializedName: "properties.releaseTrain", - type: { - name: "String" - } - }, - version: { - serializedName: "properties.version", - nullable: true, - type: { - name: "String" - } - }, - scope: { - serializedName: "properties.scope", - type: { - name: "Composite", - className: "Scope" - } - }, - configurationSettings: { - serializedName: "properties.configurationSettings", - nullable: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - configurationProtectedSettings: { - serializedName: "properties.configurationProtectedSettings", - nullable: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - currentVersion: { - serializedName: "properties.currentVersion", - readOnly: true, - nullable: true, - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - statuses: { - serializedName: "properties.statuses", - nullable: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExtensionStatus" - } - } - } - }, - errorInfo: { - serializedName: "properties.errorInfo", - type: { - name: "Composite", - className: "ErrorDetail" - } - }, - customLocationSettings: { - serializedName: "properties.customLocationSettings", - readOnly: true, - nullable: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - packageUri: { - serializedName: "properties.packageUri", - readOnly: true, - nullable: true, - type: { - name: "String" - } - }, - aksAssignedIdentity: { - serializedName: "properties.aksAssignedIdentity", - type: { - name: "Composite", - className: "ExtensionPropertiesAksAssignedIdentity" - } - }, - isSystemExtension: { - defaultValue: false, - serializedName: "properties.isSystemExtension", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const FluxConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FluxConfiguration", - modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - scope: { - defaultValue: "cluster", - serializedName: "properties.scope", - type: { - name: "String" - } - }, - namespace: { - defaultValue: "default", - serializedName: "properties.namespace", - type: { - name: "String" - } - }, - sourceKind: { - serializedName: "properties.sourceKind", - type: { - name: "String" - } - }, - suspend: { - defaultValue: false, - serializedName: "properties.suspend", - type: { - name: "Boolean" - } - }, - gitRepository: { - serializedName: "properties.gitRepository", - type: { - name: "Composite", - className: "GitRepositoryDefinition" - } - }, - bucket: { - serializedName: "properties.bucket", - type: { - name: "Composite", - className: "BucketDefinition" - } - }, - azureBlob: { - serializedName: "properties.azureBlob", - type: { - name: "Composite", - className: "AzureBlobDefinition" - } - }, - kustomizations: { - serializedName: "properties.kustomizations", - nullable: true, - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "KustomizationDefinition" } - } - } - }, - configurationProtectedSettings: { - serializedName: "properties.configurationProtectedSettings", - nullable: true, - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - statuses: { - serializedName: "properties.statuses", - readOnly: true, - nullable: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ObjectStatusDefinition" - } - } - } - }, - repositoryPublicKey: { - serializedName: "properties.repositoryPublicKey", - readOnly: true, - nullable: true, - type: { - name: "String" - } - }, - sourceSyncedCommitId: { - serializedName: "properties.sourceSyncedCommitId", - readOnly: true, - nullable: true, - type: { - name: "String" - } - }, - sourceUpdatedAt: { - serializedName: "properties.sourceUpdatedAt", - readOnly: true, - nullable: true, - type: { - name: "DateTime" - } - }, - statusUpdatedAt: { - serializedName: "properties.statusUpdatedAt", - readOnly: true, - nullable: true, - type: { - name: "DateTime" - } - }, - waitForReconciliation: { - serializedName: "properties.waitForReconciliation", - nullable: true, - type: { - name: "Boolean" - } - }, - reconciliationWaitDuration: { - serializedName: "properties.reconciliationWaitDuration", - nullable: true, - type: { - name: "String" - } - }, - complianceState: { - defaultValue: "Unknown", - serializedName: "properties.complianceState", - readOnly: true, - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - errorMessage: { - serializedName: "properties.errorMessage", - readOnly: true, - nullable: true, - type: { - name: "String" - } - } - } - } -}; - -export const SourceControlConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SourceControlConfiguration", - modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - repositoryUrl: { - serializedName: "properties.repositoryUrl", - type: { - name: "String" - } - }, - operatorNamespace: { - defaultValue: "default", - serializedName: "properties.operatorNamespace", - 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: { - defaultValue: "cluster", - serializedName: "properties.operatorScope", - type: { - name: "String" - } - }, - repositoryPublicKey: { - serializedName: "properties.repositoryPublicKey", - readOnly: true, - type: { - name: "String" - } - }, - sshKnownHostsContents: { - serializedName: "properties.sshKnownHostsContents", - type: { - name: "String" - } - }, - enableHelmOperator: { - serializedName: "properties.enableHelmOperator", - type: { - name: "Boolean" - } - }, - helmOperatorProperties: { - serializedName: "properties.helmOperatorProperties", - type: { - name: "Composite", - className: "HelmOperatorProperties" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - complianceStatus: { - serializedName: "properties.complianceStatus", - type: { - name: "Composite", - className: "ComplianceStatus" - } - } - } - } + }, + }, }; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts index 99ba697de975..824e3097c277 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/models/parameters.ts @@ -9,14 +9,11 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { Extension as ExtensionMapper, PatchExtension as PatchExtensionMapper, - FluxConfiguration as FluxConfigurationMapper, - FluxConfigurationPatch as FluxConfigurationPatchMapper, - SourceControlConfiguration as SourceControlConfigurationMapper } from "../models/mappers"; export const contentType: OperationParameter = { @@ -26,14 +23,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const extension: OperationParameter = { parameterPath: "extension", - mapper: ExtensionMapper + mapper: ExtensionMapper, }; export const accept: OperationParameter = { @@ -43,9 +40,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -54,24 +51,24 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { constraints: { - MinLength: 1 + MinLength: 1, }, serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceGroupName: OperationURLParameter = { @@ -79,14 +76,14 @@ export const resourceGroupName: OperationURLParameter = { mapper: { constraints: { MaxLength: 90, - MinLength: 1 + MinLength: 1, }, serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const clusterRp: OperationURLParameter = { @@ -95,31 +92,37 @@ export const clusterRp: OperationURLParameter = { serializedName: "clusterRp", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const clusterResourceName: OperationURLParameter = { parameterPath: "clusterResourceName", mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z]*$"), + }, serializedName: "clusterResourceName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const clusterName: OperationURLParameter = { parameterPath: "clusterName", mapper: { + constraints: { + Pattern: new RegExp("^.*"), + }, serializedName: "clusterName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const extensionName: OperationURLParameter = { @@ -128,21 +131,21 @@ export const extensionName: OperationURLParameter = { serializedName: "extensionName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-05-01", + defaultValue: "2024-11-01", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const forceDelete: OperationQueryParameter = { @@ -150,14 +153,14 @@ export const forceDelete: OperationQueryParameter = { mapper: { serializedName: "forceDelete", type: { - name: "Boolean" - } - } + name: "Boolean", + }, + }, }; export const patchExtension: OperationParameter = { parameterPath: "patchExtension", - mapper: PatchExtensionMapper + mapper: PatchExtensionMapper, }; export const nextLink: OperationURLParameter = { @@ -166,10 +169,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const operationId: OperationURLParameter = { @@ -178,44 +181,7 @@ export const operationId: OperationURLParameter = { serializedName: "operationId", required: true, type: { - name: "String" - } - } -}; - -export const fluxConfigurationName: OperationURLParameter = { - parameterPath: "fluxConfigurationName", - mapper: { - serializedName: "fluxConfigurationName", - required: true, - type: { - name: "String" - } - } -}; - -export const fluxConfiguration: OperationParameter = { - parameterPath: "fluxConfiguration", - mapper: FluxConfigurationMapper -}; - -export const fluxConfigurationPatch: OperationParameter = { - parameterPath: "fluxConfigurationPatch", - mapper: FluxConfigurationPatchMapper -}; - -export const sourceControlConfigurationName: OperationURLParameter = { - parameterPath: "sourceControlConfigurationName", - mapper: { - serializedName: "sourceControlConfigurationName", - required: true, - type: { - name: "String" - } - } -}; - -export const sourceControlConfiguration: OperationParameter = { - parameterPath: "sourceControlConfiguration", - mapper: SourceControlConfigurationMapper + name: "String", + }, + }, }; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/extensions.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/extensions.ts index a36937dce3cf..6785972b3c46 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/extensions.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/extensions.ts @@ -12,11 +12,11 @@ import { Extensions } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { SourceControlConfigurationClient } from "../sourceControlConfigurationClient"; +import { ExtensionsClient } from "../extensionsClient"; import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -32,19 +32,19 @@ import { PatchExtension, ExtensionsUpdateOptionalParams, ExtensionsUpdateResponse, - ExtensionsListNextResponse + ExtensionsListNextResponse, } from "../models"; /// /** Class containing Extensions operations. */ export class ExtensionsImpl implements Extensions { - private readonly client: SourceControlConfigurationClient; + private readonly client: ExtensionsClient; /** * Initialize a new instance of the class Extensions class. * @param client Reference to the service client */ - constructor(client: SourceControlConfigurationClient) { + constructor(client: ExtensionsClient) { this.client = client; } @@ -54,7 +54,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param options The options parameters. */ @@ -63,14 +63,14 @@ export class ExtensionsImpl implements Extensions { clusterRp: string, clusterResourceName: string, clusterName: string, - options?: ExtensionsListOptionalParams + options?: ExtensionsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll( resourceGroupName, clusterRp, clusterResourceName, clusterName, - options + options, ); return { next() { @@ -89,9 +89,9 @@ export class ExtensionsImpl implements Extensions { clusterResourceName, clusterName, options, - settings + settings, ); - } + }, }; } @@ -101,7 +101,7 @@ export class ExtensionsImpl implements Extensions { clusterResourceName: string, clusterName: string, options?: ExtensionsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ExtensionsListResponse; let continuationToken = settings?.continuationToken; @@ -111,7 +111,7 @@ export class ExtensionsImpl implements Extensions { clusterRp, clusterResourceName, clusterName, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -125,7 +125,7 @@ export class ExtensionsImpl implements Extensions { clusterResourceName, clusterName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -139,14 +139,14 @@ export class ExtensionsImpl implements Extensions { clusterRp: string, clusterResourceName: string, clusterName: string, - options?: ExtensionsListOptionalParams + options?: ExtensionsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, clusterRp, clusterResourceName, clusterName, - options + options, )) { yield* page; } @@ -158,7 +158,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param extension Properties necessary to Create an Extension. @@ -171,7 +171,7 @@ export class ExtensionsImpl implements Extensions { clusterName: string, extensionName: string, extension: Extension, - options?: ExtensionsCreateOptionalParams + options?: ExtensionsCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -180,21 +180,20 @@ export class ExtensionsImpl implements Extensions { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -203,8 +202,8 @@ export class ExtensionsImpl implements Extensions { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -212,8 +211,8 @@ export class ExtensionsImpl implements Extensions { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -226,9 +225,9 @@ export class ExtensionsImpl implements Extensions { clusterName, extensionName, extension, - options + options, }, - spec: createOperationSpec + spec: createOperationSpec, }); const poller = await createHttpPoller< ExtensionsCreateResponse, @@ -236,7 +235,7 @@ export class ExtensionsImpl implements Extensions { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -248,7 +247,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param extension Properties necessary to Create an Extension. @@ -261,7 +260,7 @@ export class ExtensionsImpl implements Extensions { clusterName: string, extensionName: string, extension: Extension, - options?: ExtensionsCreateOptionalParams + options?: ExtensionsCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, @@ -270,7 +269,7 @@ export class ExtensionsImpl implements Extensions { clusterName, extensionName, extension, - options + options, ); return poller.pollUntilDone(); } @@ -281,7 +280,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param options The options parameters. @@ -292,7 +291,7 @@ export class ExtensionsImpl implements Extensions { clusterResourceName: string, clusterName: string, extensionName: string, - options?: ExtensionsGetOptionalParams + options?: ExtensionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -301,9 +300,9 @@ export class ExtensionsImpl implements Extensions { clusterResourceName, clusterName, extensionName, - options + options, }, - getOperationSpec + getOperationSpec, ); } @@ -314,7 +313,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param options The options parameters. @@ -325,25 +324,24 @@ export class ExtensionsImpl implements Extensions { clusterResourceName: string, clusterName: string, extensionName: string, - options?: ExtensionsDeleteOptionalParams + options?: ExtensionsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -352,8 +350,8 @@ export class ExtensionsImpl implements Extensions { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -361,8 +359,8 @@ export class ExtensionsImpl implements Extensions { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -374,14 +372,14 @@ export class ExtensionsImpl implements Extensions { clusterResourceName, clusterName, extensionName, - options + options, }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -394,7 +392,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param options The options parameters. @@ -405,7 +403,7 @@ export class ExtensionsImpl implements Extensions { clusterResourceName: string, clusterName: string, extensionName: string, - options?: ExtensionsDeleteOptionalParams + options?: ExtensionsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, @@ -413,7 +411,7 @@ export class ExtensionsImpl implements Extensions { clusterResourceName, clusterName, extensionName, - options + options, ); return poller.pollUntilDone(); } @@ -424,7 +422,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param patchExtension Properties to Patch in an existing Extension. @@ -437,7 +435,7 @@ export class ExtensionsImpl implements Extensions { clusterName: string, extensionName: string, patchExtension: PatchExtension, - options?: ExtensionsUpdateOptionalParams + options?: ExtensionsUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -446,21 +444,20 @@ export class ExtensionsImpl implements Extensions { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -469,8 +466,8 @@ export class ExtensionsImpl implements Extensions { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -478,8 +475,8 @@ export class ExtensionsImpl implements Extensions { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -492,9 +489,9 @@ export class ExtensionsImpl implements Extensions { clusterName, extensionName, patchExtension, - options + options, }, - spec: updateOperationSpec + spec: updateOperationSpec, }); const poller = await createHttpPoller< ExtensionsUpdateResponse, @@ -502,7 +499,7 @@ export class ExtensionsImpl implements Extensions { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -514,7 +511,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param patchExtension Properties to Patch in an existing Extension. @@ -527,7 +524,7 @@ export class ExtensionsImpl implements Extensions { clusterName: string, extensionName: string, patchExtension: PatchExtension, - options?: ExtensionsUpdateOptionalParams + options?: ExtensionsUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceGroupName, @@ -536,7 +533,7 @@ export class ExtensionsImpl implements Extensions { clusterName, extensionName, patchExtension, - options + options, ); return poller.pollUntilDone(); } @@ -547,7 +544,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param options The options parameters. */ @@ -556,7 +553,7 @@ export class ExtensionsImpl implements Extensions { clusterRp: string, clusterResourceName: string, clusterName: string, - options?: ExtensionsListOptionalParams + options?: ExtensionsListOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -564,9 +561,9 @@ export class ExtensionsImpl implements Extensions { clusterRp, clusterResourceName, clusterName, - options + options, }, - listOperationSpec + listOperationSpec, ); } @@ -576,7 +573,7 @@ export class ExtensionsImpl implements Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -587,7 +584,7 @@ export class ExtensionsImpl implements Extensions { clusterResourceName: string, clusterName: string, nextLink: string, - options?: ExtensionsListNextOptionalParams + options?: ExtensionsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -596,9 +593,9 @@ export class ExtensionsImpl implements Extensions { clusterResourceName, clusterName, nextLink, - options + options, }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -606,25 +603,24 @@ export class ExtensionsImpl implements Extensions { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, 201: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, 202: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, 204: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.extension, queryParameters: [Parameters.apiVersion], @@ -635,23 +631,22 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.extensionName + Parameters.extensionName, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -661,14 +656,13 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.extensionName + Parameters.extensionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", httpMethod: "DELETE", responses: { 200: {}, @@ -676,8 +670,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.forceDelete], urlParameters: [ @@ -687,31 +681,30 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.extensionName + Parameters.extensionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, 201: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, 202: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, 204: { - bodyMapper: Mappers.Extension + bodyMapper: Mappers.Extension, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.patchExtension, queryParameters: [Parameters.apiVersion], @@ -722,23 +715,22 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.extensionName + Parameters.extensionName, ], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ExtensionsList + bodyMapper: Mappers.ExtensionsList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -747,21 +739,21 @@ const listOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.clusterRp, Parameters.clusterResourceName, - Parameters.clusterName + Parameters.clusterName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ExtensionsList + bodyMapper: Mappers.ExtensionsList, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, @@ -770,8 +762,8 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/fluxConfigOperationStatus.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/fluxConfigOperationStatus.ts deleted file mode 100644 index d6bba330a22c..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/fluxConfigOperationStatus.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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 { FluxConfigOperationStatus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SourceControlConfigurationClient } from "../sourceControlConfigurationClient"; -import { - FluxConfigOperationStatusGetOptionalParams, - FluxConfigOperationStatusGetResponse -} from "../models"; - -/** Class containing FluxConfigOperationStatus operations. */ -export class FluxConfigOperationStatusImpl - implements FluxConfigOperationStatus { - private readonly client: SourceControlConfigurationClient; - - /** - * Initialize a new instance of the class FluxConfigOperationStatus class. - * @param client Reference to the service client - */ - constructor(client: SourceControlConfigurationClient) { - this.client = client; - } - - /** - * Get Async Operation status - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param operationId operation Id - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - operationId: string, - options?: FluxConfigOperationStatusGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - operationId, - options - }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.operationId, - Parameters.fluxConfigurationName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/fluxConfigurations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/fluxConfigurations.ts deleted file mode 100644 index 87c528ec6b7d..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/fluxConfigurations.ts +++ /dev/null @@ -1,777 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { FluxConfigurations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SourceControlConfigurationClient } from "../sourceControlConfigurationClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - FluxConfiguration, - FluxConfigurationsListNextOptionalParams, - FluxConfigurationsListOptionalParams, - FluxConfigurationsListResponse, - FluxConfigurationsGetOptionalParams, - FluxConfigurationsGetResponse, - FluxConfigurationsCreateOrUpdateOptionalParams, - FluxConfigurationsCreateOrUpdateResponse, - FluxConfigurationPatch, - FluxConfigurationsUpdateOptionalParams, - FluxConfigurationsUpdateResponse, - FluxConfigurationsDeleteOptionalParams, - FluxConfigurationsListNextResponse -} from "../models"; - -/// -/** Class containing FluxConfigurations operations. */ -export class FluxConfigurationsImpl implements FluxConfigurations { - private readonly client: SourceControlConfigurationClient; - - /** - * Initialize a new instance of the class FluxConfigurations class. - * @param client Reference to the service client - */ - constructor(client: SourceControlConfigurationClient) { - this.client = client; - } - - /** - * List all Flux Configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: FluxConfigurationsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options, - settings - ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: FluxConfigurationsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: FluxConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: FluxConfigurationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - )) { - yield* page; - } - } - - /** - * Gets details of the Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - options?: FluxConfigurationsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - options - }, - getOperationSpec - ); - } - - /** - * Create a new Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfiguration Properties necessary to Create a FluxConfiguration. - * @param options The options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfiguration: FluxConfiguration, - options?: FluxConfigurationsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - FluxConfigurationsCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - fluxConfiguration, - options - }, - spec: createOrUpdateOperationSpec - }); - const poller = await createHttpPoller< - FluxConfigurationsCreateOrUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Create a new Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfiguration Properties necessary to Create a FluxConfiguration. - * @param options The options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfiguration: FluxConfiguration, - options?: FluxConfigurationsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - fluxConfiguration, - options - ); - return poller.pollUntilDone(); - } - - /** - * Update an existing Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfigurationPatch Properties to Patch in an existing Flux Configuration. - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfigurationPatch: FluxConfigurationPatch, - options?: FluxConfigurationsUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - FluxConfigurationsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - fluxConfigurationPatch, - options - }, - spec: updateOperationSpec - }); - const poller = await createHttpPoller< - FluxConfigurationsUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * Update an existing Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfigurationPatch Properties to Patch in an existing Flux Configuration. - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfigurationPatch: FluxConfigurationPatch, - options?: FluxConfigurationsUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - fluxConfigurationPatch, - options - ); - return poller.pollUntilDone(); - } - - /** - * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from - * the source repo. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - options?: FluxConfigurationsDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - options - }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" - }); - await poller.poll(); - return poller; - } - - /** - * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from - * the source repo. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - options?: FluxConfigurationsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - fluxConfigurationName, - options - ); - return poller.pollUntilDone(); - } - - /** - * List all Flux Configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: FluxConfigurationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - nextLink: string, - options?: FluxConfigurationsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - nextLink, - options - }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FluxConfiguration - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.fluxConfigurationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.FluxConfiguration - }, - 201: { - bodyMapper: Mappers.FluxConfiguration - }, - 202: { - bodyMapper: Mappers.FluxConfiguration - }, - 204: { - bodyMapper: Mappers.FluxConfiguration - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.fluxConfiguration, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.fluxConfigurationName - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.FluxConfiguration - }, - 201: { - bodyMapper: Mappers.FluxConfiguration - }, - 202: { - bodyMapper: Mappers.FluxConfiguration - }, - 204: { - bodyMapper: Mappers.FluxConfiguration - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.fluxConfigurationPatch, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.fluxConfigurationName - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion, Parameters.forceDelete], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.fluxConfigurationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FluxConfigurationsList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FluxConfigurationsList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts index 7275e5b03369..31f9100d48d5 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/index.ts @@ -8,7 +8,3 @@ export * from "./extensions"; export * from "./operationStatus"; -export * from "./fluxConfigurations"; -export * from "./fluxConfigOperationStatus"; -export * from "./sourceControlConfigurations"; -export * from "./operations"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts index cb16166fbaf7..2d44e759169f 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operationStatus.ts @@ -6,147 +6,35 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; import { OperationStatus } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { SourceControlConfigurationClient } from "../sourceControlConfigurationClient"; +import { ExtensionsClient } from "../extensionsClient"; import { - OperationStatusResult, - OperationStatusListNextOptionalParams, - OperationStatusListOptionalParams, - OperationStatusListResponse, OperationStatusGetOptionalParams, OperationStatusGetResponse, - OperationStatusListNextResponse } from "../models"; -/// /** Class containing OperationStatus operations. */ export class OperationStatusImpl implements OperationStatus { - private readonly client: SourceControlConfigurationClient; + private readonly client: ExtensionsClient; /** * Initialize a new instance of the class OperationStatus class. * @param client Reference to the service client */ - constructor(client: SourceControlConfigurationClient) { + constructor(client: ExtensionsClient) { 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 - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: OperationStatusListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options, - settings - ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: OperationStatusListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OperationStatusListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: OperationStatusListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - )) { - yield* page; - } - } - /** * Get Async Operation status * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id @@ -159,7 +47,7 @@ export class OperationStatusImpl implements OperationStatus { clusterName: string, extensionName: string, operationId: string, - options?: OperationStatusGetOptionalParams + options?: OperationStatusGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -169,70 +57,9 @@ export class OperationStatusImpl implements OperationStatus { clusterName, extensionName, operationId, - options - }, - getOperationSpec - ); - } - - /** - * 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 - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: OperationStatusListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options + options, }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - nextLink: string, - options?: OperationStatusListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - nextLink, - options - }, - listNextOperationSpec + getOperationSpec, ); } } @@ -240,66 +67,17 @@ export class OperationStatusImpl implements OperationStatus { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}/operations/{operationId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}/operations/{operationId}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationStatusResult + bodyMapper: Mappers.OperationStatusResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.extensionName, - Parameters.operationId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusList + bodyMapper: Mappers.ErrorResponse, }, - default: { - bodyMapper: Mappers.ErrorResponse - } }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -307,8 +85,9 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.clusterRp, Parameters.clusterResourceName, Parameters.clusterName, - Parameters.nextLink + Parameters.extensionName, + Parameters.operationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts deleted file mode 100644 index ae33a4175dc7..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SourceControlConfigurationClient } from "../sourceControlConfigurationClient"; -import { - ResourceProviderOperation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse -} from "../models"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: SourceControlConfigurationClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: SourceControlConfigurationClient) { - this.client = client; - } - - /** - * List all the available operations the KubernetesConfiguration resource provider supports. - * @param options The options parameters. - */ - public list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - } - }; - } - - private async *listPagingPage( - options?: OperationsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: OperationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * List all the available operations the KubernetesConfiguration resource provider supports. - * @param options The options parameters. - */ - private _list( - options?: OperationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: OperationsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.KubernetesConfiguration/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceProviderOperationList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ResourceProviderOperationList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts deleted file mode 100644 index d18d2506de62..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts +++ /dev/null @@ -1,521 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { SourceControlConfigurations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SourceControlConfigurationClient } from "../sourceControlConfigurationClient"; -import { - SimplePollerLike, - OperationState, - createHttpPoller -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; -import { - SourceControlConfiguration, - SourceControlConfigurationsListNextOptionalParams, - SourceControlConfigurationsListOptionalParams, - SourceControlConfigurationsListResponse, - SourceControlConfigurationsGetOptionalParams, - SourceControlConfigurationsGetResponse, - SourceControlConfigurationsCreateOrUpdateOptionalParams, - SourceControlConfigurationsCreateOrUpdateResponse, - SourceControlConfigurationsDeleteOptionalParams, - SourceControlConfigurationsListNextResponse -} from "../models"; - -/// -/** Class containing SourceControlConfigurations operations. */ -export class SourceControlConfigurationsImpl - implements SourceControlConfigurations { - private readonly client: SourceControlConfigurationClient; - - /** - * Initialize a new instance of the class SourceControlConfigurations class. - * @param client Reference to the service client - */ - constructor(client: SourceControlConfigurationClient) { - this.client = client; - } - - /** - * List all Source Control Configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: SourceControlConfigurationsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options, - settings - ); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: SourceControlConfigurationsListOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: SourceControlConfigurationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: SourceControlConfigurationsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - )) { - yield* page; - } - } - - /** - * Gets details of the Source Control Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - options?: SourceControlConfigurationsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - sourceControlConfigurationName, - options - }, - getOperationSpec - ); - } - - /** - * Create a new Kubernetes Source Control Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - sourceControlConfiguration: SourceControlConfiguration, - options?: SourceControlConfigurationsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - sourceControlConfigurationName, - sourceControlConfiguration, - options - }, - createOrUpdateOperationSpec - ); - } - - /** - * 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. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - options?: SourceControlConfigurationsDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - sourceControlConfigurationName, - options - }, - spec: deleteOperationSpec - }); - const poller = await createHttpPoller>(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * 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. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - options?: SourceControlConfigurationsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - sourceControlConfigurationName, - options - ); - return poller.pollUntilDone(); - } - - /** - * List all Source Control Configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: SourceControlConfigurationsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - options - }, - listOperationSpec - ); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - nextLink: string, - options?: SourceControlConfigurationsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - nextLink, - options - }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SourceControlConfiguration - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.sourceControlConfigurationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SourceControlConfiguration - }, - 201: { - bodyMapper: Mappers.SourceControlConfiguration - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.sourceControlConfiguration, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.sourceControlConfigurationName - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.sourceControlConfigurationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SourceControlConfigurationList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SourceControlConfigurationList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterRp, - Parameters.clusterResourceName, - Parameters.clusterName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/extensions.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/extensions.ts index 3b1160b907e1..c61e4c43a8a7 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/extensions.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/extensions.ts @@ -18,7 +18,7 @@ import { ExtensionsDeleteOptionalParams, PatchExtension, ExtensionsUpdateOptionalParams, - ExtensionsUpdateResponse + ExtensionsUpdateResponse, } from "../models"; /// @@ -30,7 +30,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param options The options parameters. */ @@ -39,7 +39,7 @@ export interface Extensions { clusterRp: string, clusterResourceName: string, clusterName: string, - options?: ExtensionsListOptionalParams + options?: ExtensionsListOptionalParams, ): PagedAsyncIterableIterator; /** * Create a new Kubernetes Cluster Extension. @@ -47,7 +47,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param extension Properties necessary to Create an Extension. @@ -60,7 +60,7 @@ export interface Extensions { clusterName: string, extensionName: string, extension: Extension, - options?: ExtensionsCreateOptionalParams + options?: ExtensionsCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -73,7 +73,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param extension Properties necessary to Create an Extension. @@ -86,7 +86,7 @@ export interface Extensions { clusterName: string, extensionName: string, extension: Extension, - options?: ExtensionsCreateOptionalParams + options?: ExtensionsCreateOptionalParams, ): Promise; /** * Gets Kubernetes Cluster Extension. @@ -94,7 +94,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param options The options parameters. @@ -105,7 +105,7 @@ export interface Extensions { clusterResourceName: string, clusterName: string, extensionName: string, - options?: ExtensionsGetOptionalParams + options?: ExtensionsGetOptionalParams, ): Promise; /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the @@ -114,7 +114,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param options The options parameters. @@ -125,7 +125,7 @@ export interface Extensions { clusterResourceName: string, clusterName: string, extensionName: string, - options?: ExtensionsDeleteOptionalParams + options?: ExtensionsDeleteOptionalParams, ): Promise, void>>; /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the @@ -134,7 +134,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param options The options parameters. @@ -145,7 +145,7 @@ export interface Extensions { clusterResourceName: string, clusterName: string, extensionName: string, - options?: ExtensionsDeleteOptionalParams + options?: ExtensionsDeleteOptionalParams, ): Promise; /** * Patch an existing Kubernetes Cluster Extension. @@ -153,7 +153,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param patchExtension Properties to Patch in an existing Extension. @@ -166,7 +166,7 @@ export interface Extensions { clusterName: string, extensionName: string, patchExtension: PatchExtension, - options?: ExtensionsUpdateOptionalParams + options?: ExtensionsUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -179,7 +179,7 @@ export interface Extensions { * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param patchExtension Properties to Patch in an existing Extension. @@ -192,6 +192,6 @@ export interface Extensions { clusterName: string, extensionName: string, patchExtension: PatchExtension, - options?: ExtensionsUpdateOptionalParams + options?: ExtensionsUpdateOptionalParams, ): Promise; } diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/fluxConfigOperationStatus.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/fluxConfigOperationStatus.ts deleted file mode 100644 index e64d4b16a9cf..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/fluxConfigOperationStatus.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 { - FluxConfigOperationStatusGetOptionalParams, - FluxConfigOperationStatusGetResponse -} from "../models"; - -/** Interface representing a FluxConfigOperationStatus. */ -export interface FluxConfigOperationStatus { - /** - * Get Async Operation status - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param operationId operation Id - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - operationId: string, - options?: FluxConfigOperationStatusGetOptionalParams - ): Promise; -} diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/fluxConfigurations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/fluxConfigurations.ts deleted file mode 100644 index 502007d5d8bc..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/fluxConfigurations.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - FluxConfiguration, - FluxConfigurationsListOptionalParams, - FluxConfigurationsGetOptionalParams, - FluxConfigurationsGetResponse, - FluxConfigurationsCreateOrUpdateOptionalParams, - FluxConfigurationsCreateOrUpdateResponse, - FluxConfigurationPatch, - FluxConfigurationsUpdateOptionalParams, - FluxConfigurationsUpdateResponse, - FluxConfigurationsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a FluxConfigurations. */ -export interface FluxConfigurations { - /** - * List all Flux Configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: FluxConfigurationsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets details of the Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - options?: FluxConfigurationsGetOptionalParams - ): Promise; - /** - * Create a new Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfiguration Properties necessary to Create a FluxConfiguration. - * @param options The options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfiguration: FluxConfiguration, - options?: FluxConfigurationsCreateOrUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - FluxConfigurationsCreateOrUpdateResponse - > - >; - /** - * Create a new Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfiguration Properties necessary to Create a FluxConfiguration. - * @param options The options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfiguration: FluxConfiguration, - options?: FluxConfigurationsCreateOrUpdateOptionalParams - ): Promise; - /** - * Update an existing Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfigurationPatch Properties to Patch in an existing Flux Configuration. - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfigurationPatch: FluxConfigurationPatch, - options?: FluxConfigurationsUpdateOptionalParams - ): Promise< - SimplePollerLike< - OperationState, - FluxConfigurationsUpdateResponse - > - >; - /** - * Update an existing Kubernetes Flux Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param fluxConfigurationPatch Properties to Patch in an existing Flux Configuration. - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - fluxConfigurationPatch: FluxConfigurationPatch, - options?: FluxConfigurationsUpdateOptionalParams - ): Promise; - /** - * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from - * the source repo. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - options?: FluxConfigurationsDeleteOptionalParams - ): Promise, void>>; - /** - * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from - * the source repo. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - fluxConfigurationName: string, - options?: FluxConfigurationsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/index.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/index.ts index 7275e5b03369..31f9100d48d5 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/index.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/index.ts @@ -8,7 +8,3 @@ export * from "./extensions"; export * from "./operationStatus"; -export * from "./fluxConfigurations"; -export * from "./fluxConfigOperationStatus"; -export * from "./sourceControlConfigurations"; -export * from "./operations"; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/operationStatus.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/operationStatus.ts index 9538ccbe0e0d..d16b91cfc740 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/operationStatus.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/operationStatus.ts @@ -6,41 +6,20 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - OperationStatusResult, - OperationStatusListOptionalParams, OperationStatusGetOptionalParams, - OperationStatusGetResponse + OperationStatusGetResponse, } from "../models"; -/// /** Interface representing a OperationStatus. */ export interface OperationStatus { - /** - * 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 - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: OperationStatusListOptionalParams - ): PagedAsyncIterableIterator; /** * Get Async Operation status * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, * Microsoft.HybridContainerService. * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. + * connectedClusters, provisionedClusters, appliances. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id @@ -53,6 +32,6 @@ export interface OperationStatus { clusterName: string, extensionName: string, operationId: string, - options?: OperationStatusGetOptionalParams + options?: OperationStatusGetOptionalParams, ): Promise; } diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/operations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/operations.ts deleted file mode 100644 index a51f0d574aa5..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ResourceProviderOperation, - OperationsListOptionalParams -} from "../models"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * List all the available operations the KubernetesConfiguration resource provider supports. - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/sourceControlConfigurations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/sourceControlConfigurations.ts deleted file mode 100644 index 58aee4f8caf7..000000000000 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operationsInterfaces/sourceControlConfigurations.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - SourceControlConfiguration, - SourceControlConfigurationsListOptionalParams, - SourceControlConfigurationsGetOptionalParams, - SourceControlConfigurationsGetResponse, - SourceControlConfigurationsCreateOrUpdateOptionalParams, - SourceControlConfigurationsCreateOrUpdateResponse, - SourceControlConfigurationsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a SourceControlConfigurations. */ -export interface SourceControlConfigurations { - /** - * List all Source Control Configurations. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param options The options parameters. - */ - list( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - options?: SourceControlConfigurationsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets details of the Source Control Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - options?: SourceControlConfigurationsGetOptionalParams - ): Promise; - /** - * Create a new Kubernetes Source Control Configuration. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - sourceControlConfiguration: SourceControlConfiguration, - options?: SourceControlConfigurationsCreateOrUpdateOptionalParams - ): 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. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - options?: SourceControlConfigurationsDeleteOptionalParams - ): Promise, void>>; - /** - * 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. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, - * connectedClusters, provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterRp: string, - clusterResourceName: string, - clusterName: string, - sourceControlConfigurationName: string, - options?: SourceControlConfigurationsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/pagingHelper.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/pagingHelper.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/test/sampleTest.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json index 5341a8d13163..b35d05ad6e9d 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-kubernetesconfiguration": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules" diff --git a/sdk/kubernetesconfiguration/ci.mgmt.yml b/sdk/kubernetesconfiguration/ci.mgmt.yml index bac5cdc3afbb..54d74c1380bc 100644 --- a/sdk/kubernetesconfiguration/ci.mgmt.yml +++ b/sdk/kubernetesconfiguration/ci.mgmt.yml @@ -30,3 +30,5 @@ extends: Artifacts: - name: azure-arm-kubernetesconfiguration safeName: azurearmkubernetesconfiguration + - name: azure-arm-kubernetesconfiguration-extensions + safeName: azurearmkubernetesconfigurationextensions