From f76260bea97e98402799f9591ea4049d1e4c47c7 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 2 Nov 2021 23:03:00 +0000 Subject: [PATCH] CodeGen from PR 16641 in Azure/azure-rest-api-specs Merge ec531605a7f40f3fc1e49e3db596b16f7aa0d582 into 0fba9ba4b78d20fc1a7ec251dab889b7a7eb8afd --- .../arm-managedapplications/LICENSE.txt | 2 +- .../arm-managedapplications/README.md | 21 +- .../arm-managedapplications/package.json | 20 +- .../arm-managedapplications/rollup.config.js | 8 +- ...licationClient.ts => applicationClient.ts} | 38 +- ...Context.ts => applicationClientContext.ts} | 17 +- .../src/models/applianceDefinitionsMappers.ts | 24 - .../src/models/appliancesMappers.ts | 24 - .../models/applicationDefinitionsMappers.ts | 45 + .../src/models/applicationsMappers.ts | 44 + .../src/models/index.ts | 1086 ++++++++++--- .../src/models/jitRequestsMappers.ts | 45 + .../src/models/mappers.ts | 1367 ++++++++++++++--- .../src/models/parameters.ts | 54 +- .../src/operations/applianceDefinitions.ts | 492 ------ .../src/operations/appliances.ts | 716 --------- .../src/operations/applicationDefinitions.ts | 481 ++++++ .../src/operations/applications.ts | 586 +++++++ .../src/operations/index.ts | 10 +- .../src/operations/jitRequests.ts | 378 +++++ .../arm-managedapplications/tsconfig.json | 2 +- 21 files changed, 3752 insertions(+), 1708 deletions(-) rename sdk/managedapplications/arm-managedapplications/src/{managedApplicationClient.ts => applicationClient.ts} (82%) rename sdk/managedapplications/arm-managedapplications/src/{managedApplicationClientContext.ts => applicationClientContext.ts} (83%) delete mode 100644 sdk/managedapplications/arm-managedapplications/src/models/applianceDefinitionsMappers.ts delete mode 100644 sdk/managedapplications/arm-managedapplications/src/models/appliancesMappers.ts create mode 100644 sdk/managedapplications/arm-managedapplications/src/models/applicationDefinitionsMappers.ts create mode 100644 sdk/managedapplications/arm-managedapplications/src/models/applicationsMappers.ts create mode 100644 sdk/managedapplications/arm-managedapplications/src/models/jitRequestsMappers.ts delete mode 100644 sdk/managedapplications/arm-managedapplications/src/operations/applianceDefinitions.ts delete mode 100644 sdk/managedapplications/arm-managedapplications/src/operations/appliances.ts create mode 100644 sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts create mode 100644 sdk/managedapplications/arm-managedapplications/src/operations/applications.ts create mode 100644 sdk/managedapplications/arm-managedapplications/src/operations/jitRequests.ts diff --git a/sdk/managedapplications/arm-managedapplications/LICENSE.txt b/sdk/managedapplications/arm-managedapplications/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/managedapplications/arm-managedapplications/LICENSE.txt +++ b/sdk/managedapplications/arm-managedapplications/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2021 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/managedapplications/arm-managedapplications/README.md b/sdk/managedapplications/arm-managedapplications/README.md index 974bf97f698f..9db13de67e23 100644 --- a/sdk/managedapplications/arm-managedapplications/README.md +++ b/sdk/managedapplications/arm-managedapplications/README.md @@ -1,11 +1,11 @@ -## Azure ManagedApplicationClient SDK for JavaScript +## Azure ApplicationClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagedApplicationClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for ApplicationClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-managedapplications @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,21 +36,19 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and listOperations as an example written in JavaScript. +#### nodejs - Authentication, client creation, and listOperations as an example written in JavaScript. ##### Sample code ```javascript const { DefaultAzureCredential } = require("@azure/identity"); -const { ManagedApplicationClient } = require("@azure/arm-managedapplications"); +const { ApplicationClient } = require("@azure/arm-managedapplications"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); -const client = new ManagedApplicationClient(creds, subscriptionId); - +const client = new ApplicationClient(creds, subscriptionId); client.listOperations().then((result) => { console.log("The result is:"); console.log(result); @@ -61,7 +58,7 @@ client.listOperations().then((result) => { }); ``` -#### browser - Authentication, client creation, and listOperations as an example written in JavaScript. +#### browser - Authentication, client creation, and listOperations as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -86,9 +83,9 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); - const client = new Azure.ArmManagedapplications.ManagedApplicationClient(creds, subscriptionId); + const client = new Azure.ArmManagedapplications.ApplicationClient(creds, subscriptionId); client.listOperations().then((result) => { console.log("The result is:"); console.log(result); diff --git a/sdk/managedapplications/arm-managedapplications/package.json b/sdk/managedapplications/arm-managedapplications/package.json index 42966448a5a2..1f613c18fa48 100644 --- a/sdk/managedapplications/arm-managedapplications/package.json +++ b/sdk/managedapplications/arm-managedapplications/package.json @@ -1,13 +1,13 @@ { "name": "@azure/arm-managedapplications", "author": "Microsoft Corporation", - "description": "ManagedApplicationClient Library with typescript type definitions for node.js and browser.", + "description": "ApplicationClient Library with typescript type definitions for node.js and browser.", "version": "1.1.2", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -18,16 +18,16 @@ ], "license": "MIT", "main": "./dist/arm-managedapplications.js", - "module": "./esm/managedApplicationClient.js", - "types": "./esm/managedApplicationClient.d.ts", + "module": "./esm/applicationClient.js", + "types": "./esm/applicationClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/managedapplications/arm-managedapplications", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/managedapplications/arm-managedapplications", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/managedapplications/arm-managedapplications/rollup.config.js b/sdk/managedapplications/arm-managedapplications/rollup.config.js index 24a2779acf2e..d17794cf6401 100644 --- a/sdk/managedapplications/arm-managedapplications/rollup.config.js +++ b/sdk/managedapplications/arm-managedapplications/rollup.config.js @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; * @type {rollup.RollupFileOptions} */ const config = { - input: "./esm/managedApplicationClient.js", + input: "./esm/applicationClient.js", external: [ "@azure/ms-rest-js", "@azure/ms-rest-azure-js" @@ -21,15 +21,15 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts b/sdk/managedapplications/arm-managedapplications/src/applicationClient.ts similarity index 82% rename from sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts rename to sdk/managedapplications/arm-managedapplications/src/applicationClient.ts index 0c6f3320edf5..f40d5c5f5e59 100644 --- a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClient.ts +++ b/sdk/managedapplications/arm-managedapplications/src/applicationClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -14,16 +13,17 @@ import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; import * as operations from "./operations"; -import { ManagedApplicationClientContext } from "./managedApplicationClientContext"; +import { ApplicationClientContext } from "./applicationClientContext"; -class ManagedApplicationClient extends ManagedApplicationClientContext { +class ApplicationClient extends ApplicationClientContext { // Operation groups - appliances: operations.Appliances; - applianceDefinitions: operations.ApplianceDefinitions; + applications: operations.Applications; + applicationDefinitions: operations.ApplicationDefinitions; + jitRequests: operations.JitRequests; /** - * Initializes a new instance of the ManagedApplicationClient class. + * Initializes a new instance of the ApplicationClient class. * @param credentials Credentials needed for the client to connect to Azure. Credentials * implementing the TokenCredential interface from the @azure/identity package are recommended. For * more information about these credentials, see @@ -33,10 +33,11 @@ class ManagedApplicationClient extends ManagedApplicationClientContext { * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ApplicationClientOptions) { super(credentials, subscriptionId, options); - this.appliances = new operations.Appliances(this); - this.applianceDefinitions = new operations.ApplianceDefinitions(this); + this.applications = new operations.Applications(this); + this.applicationDefinitions = new operations.ApplicationDefinitions(this); + this.jitRequests = new operations.JitRequests(this); } /** @@ -108,7 +109,7 @@ const listOperationsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -121,6 +122,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -129,16 +133,16 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; export { - ManagedApplicationClient, - ManagedApplicationClientContext, - Models as ManagedApplicationModels, - Mappers as ManagedApplicationMappers + ApplicationClient, + ApplicationClientContext, + Models as ApplicationModels, + Mappers as ApplicationMappers }; export * from "./operations"; diff --git a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts b/sdk/managedapplications/arm-managedapplications/src/applicationClientContext.ts similarity index 83% rename from sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts rename to sdk/managedapplications/arm-managedapplications/src/applicationClientContext.ts index 04fe0ad67264..0db0aff642e6 100644 --- a/sdk/managedapplications/arm-managedapplications/src/managedApplicationClientContext.ts +++ b/sdk/managedapplications/arm-managedapplications/src/applicationClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -10,19 +9,19 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-managedapplications"; const packageVersion = "1.1.2"; -export class ManagedApplicationClientContext extends msRestAzure.AzureServiceClient { +export class ApplicationClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** - * Initializes a new instance of the ManagedApplicationClient class. + * Initializes a new instance of the ApplicationClient class. * @param credentials Credentials needed for the client to connect to Azure. Credentials * implementing the TokenCredential interface from the @azure/identity package are recommended. For * more information about these credentials, see @@ -32,7 +31,7 @@ export class ManagedApplicationClientContext extends msRestAzure.AzureServiceCli * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedApplicationClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ApplicationClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -50,7 +49,7 @@ export class ManagedApplicationClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2016-09-01-preview'; + this.apiVersion = '2021-07-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/managedapplications/arm-managedapplications/src/models/applianceDefinitionsMappers.ts b/sdk/managedapplications/arm-managedapplications/src/models/applianceDefinitionsMappers.ts deleted file mode 100644 index bf65dc418a3c..000000000000 --- a/sdk/managedapplications/arm-managedapplications/src/models/applianceDefinitionsMappers.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - Appliance, - ApplianceArtifact, - ApplianceDefinition, - ApplianceDefinitionListResult, - AppliancePatchable, - ApplianceProviderAuthorization, - BaseResource, - ErrorResponse, - GenericResource, - Identity, - Plan, - PlanPatchable, - Resource, - Sku -} from "../models/mappers"; diff --git a/sdk/managedapplications/arm-managedapplications/src/models/appliancesMappers.ts b/sdk/managedapplications/arm-managedapplications/src/models/appliancesMappers.ts deleted file mode 100644 index d4d39be5ada8..000000000000 --- a/sdk/managedapplications/arm-managedapplications/src/models/appliancesMappers.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - Appliance, - ApplianceArtifact, - ApplianceDefinition, - ApplianceListResult, - AppliancePatchable, - ApplianceProviderAuthorization, - BaseResource, - ErrorResponse, - GenericResource, - Identity, - Plan, - PlanPatchable, - Resource, - Sku -} from "../models/mappers"; diff --git a/sdk/managedapplications/arm-managedapplications/src/models/applicationDefinitionsMappers.ts b/sdk/managedapplications/arm-managedapplications/src/models/applicationDefinitionsMappers.ts new file mode 100644 index 000000000000..2525738747cc --- /dev/null +++ b/sdk/managedapplications/arm-managedapplications/src/models/applicationDefinitionsMappers.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + Application, + ApplicationArtifact, + ApplicationAuthorization, + ApplicationBillingDetailsDefinition, + ApplicationClientDetails, + ApplicationDefinition, + ApplicationDefinitionArtifact, + ApplicationDefinitionListResult, + ApplicationDefinitionPatchable, + ApplicationDeploymentPolicy, + ApplicationJitAccessPolicy, + ApplicationManagementPolicy, + ApplicationNotificationEndpoint, + ApplicationNotificationPolicy, + ApplicationPackageContact, + ApplicationPackageLockingPolicyDefinition, + ApplicationPackageSupportUrls, + ApplicationPatchable, + ApplicationPolicy, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + GenericResource, + JitApproverDefinition, + JitAuthorizationPolicies, + JitRequestDefinition, + JitSchedulingPolicy, + ManagedServiceIdentity, + Plan, + PlanPatchable, + Resource, + Sku, + SystemData, + UserAssignedIdentity +} from "../models/mappers"; diff --git a/sdk/managedapplications/arm-managedapplications/src/models/applicationsMappers.ts b/sdk/managedapplications/arm-managedapplications/src/models/applicationsMappers.ts new file mode 100644 index 000000000000..2268bb906a1f --- /dev/null +++ b/sdk/managedapplications/arm-managedapplications/src/models/applicationsMappers.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + Application, + ApplicationArtifact, + ApplicationAuthorization, + ApplicationBillingDetailsDefinition, + ApplicationClientDetails, + ApplicationDefinition, + ApplicationDefinitionArtifact, + ApplicationDeploymentPolicy, + ApplicationJitAccessPolicy, + ApplicationListResult, + ApplicationManagementPolicy, + ApplicationNotificationEndpoint, + ApplicationNotificationPolicy, + ApplicationPackageContact, + ApplicationPackageLockingPolicyDefinition, + ApplicationPackageSupportUrls, + ApplicationPatchable, + ApplicationPolicy, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + GenericResource, + JitApproverDefinition, + JitAuthorizationPolicies, + JitRequestDefinition, + JitSchedulingPolicy, + ManagedServiceIdentity, + Plan, + PlanPatchable, + Resource, + Sku, + SystemData, + UserAssignedIdentity +} from "../models/mappers"; diff --git a/sdk/managedapplications/arm-managedapplications/src/models/index.ts b/sdk/managedapplications/arm-managedapplications/src/models/index.ts index 28e979a00944..9a807682549a 100644 --- a/sdk/managedapplications/arm-managedapplications/src/models/index.ts +++ b/sdk/managedapplications/arm-managedapplications/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -12,7 +12,144 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * Plan for the appliance. + * Managed application billing details definition. + */ +export interface ApplicationBillingDetailsDefinition { + /** + * The managed application resource usage Id. + */ + resourceUsageId?: string; +} + +/** + * JIT approver definition. + */ +export interface JitApproverDefinition { + /** + * The approver service principal Id. + */ + id: string; + /** + * The approver type. Possible values include: 'user', 'group' + */ + type?: JitApproverType; + /** + * The approver display name. + */ + displayName?: string; +} + +/** + * Managed application Jit access policy. + */ +export interface ApplicationJitAccessPolicy { + /** + * Whether the JIT access is enabled. + */ + jitAccessEnabled: boolean; + /** + * JIT approval mode. Possible values include: 'NotSpecified', 'AutoApprove', 'ManualApprove' + */ + jitApprovalMode?: JitApprovalMode; + /** + * The JIT approvers + */ + jitApprovers?: JitApproverDefinition[]; + /** + * The maximum duration JIT access is granted. This is an ISO8601 time period value. + */ + maximumJitAccessDuration?: string; +} + +/** + * The managed application provider authorization. + */ +export interface ApplicationAuthorization { + /** + * The provider's principal identifier. This is the identity that the provider will use to call + * ARM to manage the managed application resources. + */ + principalId: string; + /** + * The provider's role definition identifier. This role will define all the permissions that the + * provider must have on the managed application's container resource group. This role definition + * cannot have permission to delete the resource group. + */ + roleDefinitionId: string; +} + +/** + * The application package contact information. + */ +export interface ApplicationPackageContact { + /** + * The contact name. + */ + contactName?: string; + /** + * The contact email. + */ + email: string; + /** + * The contact phone number. + */ + phone: string; +} + +/** + * The appliance package support URLs. + */ +export interface ApplicationPackageSupportUrls { + /** + * The public azure support URL. + */ + publicAzure?: string; + /** + * The government cloud support URL. + */ + governmentCloud?: string; +} + +/** + * Managed application artifact. + */ +export interface ApplicationArtifact { + /** + * The managed application artifact name. Possible values include: 'NotSpecified', + * 'ViewDefinition', 'Authorizations', 'CustomRoleDefinition' + */ + name: ApplicationArtifactName; + /** + * The managed application artifact blob uri. + */ + uri: string; + /** + * The managed application artifact type. Possible values include: 'NotSpecified', 'Template', + * 'Custom' + */ + type: ApplicationArtifactType; +} + +/** + * The application client details to track the entity creating/updating the managed app resource. + */ +export interface ApplicationClientDetails { + /** + * The client Oid. + */ + oid?: string; + /** + * The client Puid + */ + puid?: string; + /** + * The client application Id. + */ + applicationId?: string; +} + +/** + * Plan for the managed application. */ export interface Plan { /** @@ -37,6 +174,46 @@ export interface Plan { version: string; } +/** + * User assigned identity properties + */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; +} + +/** + * Managed service identity (system assigned and/or user assigned identities) + */ +export interface ManagedServiceIdentity { + /** + * The service principal ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a + * system assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * Possible values include: 'None', 'SystemAssigned', 'UserAssigned', + * 'SystemAssigned,UserAssigned' + */ + type: ManagedServiceIdentityType; + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + /** * Resource information. */ @@ -64,6 +241,10 @@ export interface Resource extends BaseResource { * Resource tags */ tags?: { [propertyName: string]: string }; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -78,56 +259,102 @@ export interface GenericResource extends Resource { * The SKU of the resource. */ sku?: Sku; - /** - * The identity of the resource. - */ - identity?: Identity; } /** - * Information about appliance. + * Information about managed application. */ -export interface Appliance extends GenericResource { +export interface Application extends GenericResource { /** * The managed resource group Id. */ - managedResourceGroupId: string; + managedResourceGroupId?: string; /** - * The fully qualified path of appliance definition Id. + * The fully qualified path of managed application definition Id. */ - applianceDefinitionId?: string; + applicationDefinitionId?: string; /** - * Name and value pairs that define the appliance parameters. It can be a JObject or a well - * formed JSON string. + * Name and value pairs that define the managed application parameters. It can be a JObject or a + * well formed JSON string. */ parameters?: any; /** - * Name and value pairs that define the appliance outputs. + * Name and value pairs that define the managed application outputs. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly outputs?: any; /** - * The appliance provisioning state. Possible values include: 'Accepted', 'Running', 'Ready', - * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * The managed application provisioning state. Possible values include: 'NotSpecified', + * 'Accepted', 'Running', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; /** - * The blob URI where the UI definition file is located. + * The managed application billing details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingDetails?: ApplicationBillingDetailsDefinition; + /** + * The managed application Jit access policy. + */ + jitAccessPolicy?: ApplicationJitAccessPolicy; + /** + * The publisher tenant Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publisherTenantId?: string; + /** + * The read-only authorizations property that is retrieved from the application package. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly authorizations?: ApplicationAuthorization[]; + /** + * The managed application management mode. Possible values include: 'NotSpecified', 'Unmanaged', + * 'Managed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - uiDefinitionUri?: string; + readonly managementMode?: ApplicationManagementMode; + /** + * The read-only customer support property that is retrieved from the application package. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerSupport?: ApplicationPackageContact; + /** + * The read-only support URLs property that is retrieved from the application package. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportUrls?: ApplicationPackageSupportUrls; + /** + * The collection of managed application artifacts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly artifacts?: ApplicationArtifact[]; + /** + * The client entity that created the JIT request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdBy?: ApplicationClientDetails; + /** + * The client entity that last updated the JIT request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedBy?: ApplicationClientDetails; /** * The plan information. */ plan?: Plan; /** - * The kind of the appliance. Allowed values are MarketPlace and ServiceCatalog. + * The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. */ - kind?: string; + kind: string; + /** + * The identity of the resource. + */ + identity?: ManagedServiceIdentity; } /** - * Plan for the appliance. + * Plan for the managed application. */ export interface PlanPatchable { /** @@ -153,111 +380,303 @@ export interface PlanPatchable { } /** - * Information about appliance. + * Information about managed application. */ -export interface AppliancePatchable extends GenericResource { +export interface ApplicationPatchable extends GenericResource { /** * The managed resource group Id. */ managedResourceGroupId?: string; /** - * The fully qualified path of appliance definition Id. + * The fully qualified path of managed application definition Id. */ - applianceDefinitionId?: string; + applicationDefinitionId?: string; /** - * Name and value pairs that define the appliance parameters. It can be a JObject or a well - * formed JSON string. + * Name and value pairs that define the managed application parameters. It can be a JObject or a + * well formed JSON string. */ parameters?: any; /** - * Name and value pairs that define the appliance outputs. + * Name and value pairs that define the managed application outputs. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly outputs?: any; /** - * The appliance provisioning state. Possible values include: 'Accepted', 'Running', 'Ready', - * 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * The managed application provisioning state. Possible values include: 'NotSpecified', + * 'Accepted', 'Running', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; /** - * The blob URI where the UI definition file is located. + * The managed application billing details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingDetails?: ApplicationBillingDetailsDefinition; + /** + * The managed application Jit access policy. + */ + jitAccessPolicy?: ApplicationJitAccessPolicy; + /** + * The publisher tenant Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publisherTenantId?: string; + /** + * The read-only authorizations property that is retrieved from the application package. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly authorizations?: ApplicationAuthorization[]; + /** + * The managed application management mode. Possible values include: 'NotSpecified', 'Unmanaged', + * 'Managed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - uiDefinitionUri?: string; + readonly managementMode?: ApplicationManagementMode; + /** + * The read-only customer support property that is retrieved from the application package. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly customerSupport?: ApplicationPackageContact; + /** + * The read-only support URLs property that is retrieved from the application package. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportUrls?: ApplicationPackageSupportUrls; + /** + * The collection of managed application artifacts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly artifacts?: ApplicationArtifact[]; + /** + * The client entity that created the JIT request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdBy?: ApplicationClientDetails; + /** + * The client entity that last updated the JIT request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedBy?: ApplicationClientDetails; /** * The plan information. */ plan?: PlanPatchable; /** - * The kind of the appliance. Allowed values are MarketPlace and ServiceCatalog. + * The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. */ kind?: string; + /** + * The identity of the resource. + */ + identity?: ManagedServiceIdentity; } /** - * The appliance provider authorization. + * Application definition artifact. */ -export interface ApplianceProviderAuthorization { +export interface ApplicationDefinitionArtifact { /** - * The provider's principal identifier. This is the identity that the provider will use to call - * ARM to manage the appliance resources. + * The managed application definition artifact name. Possible values include: 'NotSpecified', + * 'ApplicationResourceTemplate', 'CreateUiDefinition', 'MainTemplateParameters' */ - principalId: string; + name: ApplicationDefinitionArtifactName; /** - * The provider's role definition identifier. This role will define all the permissions that the - * provider must have on the appliance's container resource group. This role definition cannot - * have permission to delete the resource group. + * The managed application definition artifact blob uri. */ - roleDefinitionId: string; + uri: string; + /** + * The managed application definition artifact type. Possible values include: 'NotSpecified', + * 'Template', 'Custom' + */ + type: ApplicationArtifactType; +} + +/** + * Managed application notification endpoint. + */ +export interface ApplicationNotificationEndpoint { + /** + * The managed application notification endpoint uri. + */ + uri: string; } /** - * Appliance artifact. + * Managed application notification policy. */ -export interface ApplianceArtifact { +export interface ApplicationNotificationPolicy { /** - * The appliance artifact name. + * The managed application notification endpoint. + */ + notificationEndpoints: ApplicationNotificationEndpoint[]; +} + +/** + * Managed application locking policy. + */ +export interface ApplicationPackageLockingPolicyDefinition { + /** + * The deny assignment excluded actions. + */ + allowedActions?: string[]; +} + +/** + * Managed application deployment policy. + */ +export interface ApplicationDeploymentPolicy { + /** + * The managed application deployment mode. Possible values include: 'NotSpecified', + * 'Incremental', 'Complete' + */ + deploymentMode: DeploymentMode; +} + +/** + * Managed application management policy. + */ +export interface ApplicationManagementPolicy { + /** + * The managed application management mode. Possible values include: 'NotSpecified', 'Unmanaged', + * 'Managed' + */ + mode?: ApplicationManagementMode; +} + +/** + * Managed application policy. + */ +export interface ApplicationPolicy { + /** + * The policy name */ name?: string; /** - * The appliance artifact blob uri. + * The policy definition Id. */ - uri?: string; + policyDefinitionId?: string; /** - * The the appliance artifact type. Possible values include: 'Template', 'Custom' + * The policy parameters. */ - type?: ApplianceArtifactType; + parameters?: string; } /** - * Information about appliance definition. + * Information about managed application definition. */ -export interface ApplianceDefinition extends GenericResource { +export interface ApplicationDefinition extends GenericResource { /** - * The appliance lock level. Possible values include: 'CanNotDelete', 'ReadOnly', 'None' + * The managed application lock level. Possible values include: 'CanNotDelete', 'ReadOnly', + * 'None' */ - lockLevel: ApplianceLockLevel; + lockLevel: ApplicationLockLevel; /** - * The appliance definition display name. + * The managed application definition display name. */ displayName?: string; /** - * The appliance provider authorizations. + * A value indicating whether the package is enabled or not. */ - authorizations: ApplianceProviderAuthorization[]; + isEnabled?: boolean; /** - * The collection of appliance artifacts. The portal will use the files specified as artifacts to - * construct the user experience of creating an appliance from an appliance definition. + * The managed application provider authorizations. */ - artifacts?: ApplianceArtifact[]; + authorizations?: ApplicationAuthorization[]; /** - * The appliance definition description. + * The collection of managed application artifacts. The portal will use the files specified as + * artifacts to construct the user experience of creating a managed application from a managed + * application definition. + */ + artifacts?: ApplicationDefinitionArtifact[]; + /** + * Provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', + * 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The managed application definition description. */ description?: string; /** - * The appliance definition package file Uri. + * The managed application definition package file Uri. Use this element + */ + packageFileUri?: string; + /** + * The storage account id for bring your own storage scenario. + */ + storageAccountId?: string; + /** + * The inline main template json which has resources to be provisioned. It can be a JObject or + * well-formed JSON string. + */ + mainTemplate?: any; + /** + * The createUiDefinition json for the backing template with Microsoft.Solutions/applications + * resource. It can be a JObject or well-formed JSON string. + */ + createUiDefinition?: any; + /** + * The managed application notification policy. + */ + notificationPolicy?: ApplicationNotificationPolicy; + /** + * The managed application locking policy. + */ + lockingPolicy?: ApplicationPackageLockingPolicyDefinition; + /** + * The managed application deployment policy. + */ + deploymentPolicy?: ApplicationDeploymentPolicy; + /** + * The managed application management policy that determines publisher's access to the managed + * resource group. + */ + managementPolicy?: ApplicationManagementPolicy; + /** + * The managed application provider policies. + */ + policies?: ApplicationPolicy[]; +} + +/** + * The managed application properties. + */ +export interface ApplicationPropertiesPatchable { + /** + * The managed resource group Id. + */ + managedResourceGroupId?: string; + /** + * The fully qualified path of managed application definition Id. + */ + applicationDefinitionId?: string; + /** + * Name and value pairs that define the managed application parameters. It can be a JObject or a + * well formed JSON string. + */ + parameters?: any; + /** + * Name and value pairs that define the managed application outputs. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly outputs?: any; + /** + * The managed application provisioning state. Possible values include: 'NotSpecified', + * 'Accepted', 'Running', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + +/** + * Information about an application definition request. + */ +export interface ApplicationDefinitionPatchable { + /** + * Application definition tags */ - packageFileUri: string; + tags?: { [propertyName: string]: string }; } /** @@ -291,122 +710,300 @@ export interface Sku { } /** - * Identity for the resource. + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; +} + +/** + * The JIT authorization policies. + */ +export interface JitAuthorizationPolicies { + /** + * The the principal id that will be granted JIT access. + */ + principalId: string; + /** + * The role definition id that will be granted to the Principal. + */ + roleDefinitionId: string; +} + +/** + * The JIT scheduling policies. */ -export interface Identity { +export interface JitSchedulingPolicy { /** - * The principal ID of resource identity. + * The type of JIT schedule. Possible values include: 'NotSpecified', 'Once', 'Recurring' + */ + type: JitSchedulingType; + /** + * The required duration of the JIT request. + */ + duration: string; + /** + * The start time of the request. + */ + startTime: Date; +} + +/** + * Information about JIT request definition. + */ +export interface JitRequestDefinition extends Resource { + /** + * The parent application id. + */ + applicationResourceId: string; + /** + * The publisher tenant id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly principalId?: string; + readonly publisherTenantId?: string; + /** + * The JIT authorization policies. + */ + jitAuthorizationPolicies: JitAuthorizationPolicies[]; /** - * The tenant ID of resource. + * The JIT request properties. + */ + jitSchedulingPolicy: JitSchedulingPolicy; + /** + * The JIT request provisioning state. Possible values include: 'NotSpecified', 'Accepted', + * 'Running', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tenantId?: string; + readonly provisioningState?: ProvisioningState; /** - * The identity type. Possible values include: 'SystemAssigned' + * The JIT request state. Possible values include: 'NotSpecified', 'Pending', 'Approved', + * 'Denied', 'Failed', 'Canceled', 'Expired', 'Timeout' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly jitRequestState?: JitRequestState; + /** + * The client entity that created the JIT request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - type?: ResourceIdentityType; + readonly createdBy?: ApplicationClientDetails; + /** + * The client entity that last updated the JIT request. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updatedBy?: ApplicationClientDetails; } /** - * Error response indicates ARM appliance is not able to process the incoming request. The reason - * is provided in the error message. + * Information about JIT request. */ -export interface ErrorResponse { +export interface JitRequestPatchable { /** - * Http status code. + * Jit request tags */ - httpStatus?: string; + tags?: { [propertyName: string]: string }; +} + +/** + * List of JIT requests. + */ +export interface JitRequestDefinitionListResult { /** - * Error code. + * The array of Jit request definition. */ - errorCode?: string; + value?: JitRequestDefinition[]; /** - * Error message indicating why the operation failed. + * The URL to use for getting the next set of results. */ - errorMessage?: string; + nextLink?: string; } /** - * The object that represents the operation. + * The resource management error additional info. */ -export interface OperationDisplay { +export interface ErrorAdditionalInfo { /** - * Service provider: Microsoft.Solutions + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provider?: string; + readonly type?: string; /** - * Resource on which the operation is performed: Profile, endpoint, etc. + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resource?: string; + readonly info?: any; +} + +/** + * The error detail. + */ +export interface ErrorDetail { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; /** - * Operation type: Read, write, delete, etc. + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operation?: string; + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** - * Microsoft.Solutions operation + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response */ -export interface Operation { +export interface ErrorResponse { /** - * Operation name: {provider}/{resource}/{operation} + * The error object. */ - name?: string; + error?: ErrorDetail; +} + +/** + * Localized display information for this particular operation. + */ +export interface OperationDisplay { /** - * The object that represents the operation. + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual + * Machines" or "Job Schedule Collections". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create + * or Update Virtual Machine", "Restart Virtual Machine". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and + * detailed views. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; } /** - * Optional Parameters. + * Details of a REST API operation, returned from the Resource Provider Operations API + * @summary REST API Operation */ -export interface AppliancesUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface Operation { /** - * Parameters supplied to update an existing appliance. + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - parameters?: Appliance; + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and + * "false" for ARM/control-plane operations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isDataAction?: boolean; + /** + * Localized display information for this particular operation. + */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + * logs UX. Default value is "user,system". Possible values include: 'user', 'system', + * 'user,system' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Possible values include: 'Internal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionType?: ActionType; } /** * Optional Parameters. */ -export interface AppliancesUpdateByIdOptionalParams extends msRest.RequestOptionsBase { +export interface ApplicationsUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * Parameters supplied to update an existing appliance. + * Parameters supplied to update an existing managed application. */ - parameters?: Appliance; + parameters?: ApplicationPatchable; } /** - * An interface representing ManagedApplicationClientOptions. + * An interface representing ApplicationClientOptions. */ -export interface ManagedApplicationClientOptions extends AzureServiceClientOptions { +export interface ApplicationClientOptions extends AzureServiceClientOptions { baseUri?: string; } /** * @interface - * Result of the request to list Microsoft.Solutions operations. It contains a list of operations - * and a URL link to get the next set of results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link + * to get the next set of results. * @extends Array */ export interface OperationListResult extends Array { /** - * URL to get the next set of operation list results if there are any. + * URL to get the next set of operation list results (if there are any). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** * @interface - * List of appliances. - * @extends Array + * List of managed applications. + * @extends Array */ -export interface ApplianceListResult extends Array { +export interface ApplicationListResult extends Array { /** * The URL to use for getting the next set of results. */ @@ -415,10 +1012,10 @@ export interface ApplianceListResult extends Array { /** * @interface - * List of appliance definitions. - * @extends Array + * List of managed application definitions. + * @extends Array */ -export interface ApplianceDefinitionListResult extends Array { +export interface ApplicationDefinitionListResult extends Array { /** * The URL to use for getting the next set of results. */ @@ -427,36 +1024,127 @@ export interface ApplianceDefinitionListResult extends Array - */ - get(resourceGroupName: string, applianceDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceDefinitionName The name of the appliance definition. - * @param callback The callback - */ - get(resourceGroupName: string, applianceDefinitionName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceDefinitionName The name of the appliance definition. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, applianceDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, applianceDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - applianceDefinitionName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Deletes the appliance definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceDefinitionName The name of the appliance definition to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, applianceDefinitionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,applianceDefinitionName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Creates a new appliance definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceDefinitionName The name of the appliance definition. - * @param parameters Parameters supplied to the create or update an appliance definition. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, applianceDefinitionName: string, parameters: Models.ApplianceDefinition, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,applianceDefinitionName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Lists the appliance definitions in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Gets the appliance definition. - * @param applianceDefinitionId The fully qualified ID of the appliance definition, including the - * appliance name and the appliance definition resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} - * @param [options] The optional parameters - * @returns Promise - */ - getById(applianceDefinitionId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applianceDefinitionId The fully qualified ID of the appliance definition, including the - * appliance name and the appliance definition resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} - * @param callback The callback - */ - getById(applianceDefinitionId: string, callback: msRest.ServiceCallback): void; - /** - * @param applianceDefinitionId The fully qualified ID of the appliance definition, including the - * appliance name and the appliance definition resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} - * @param options The optional parameters - * @param callback The callback - */ - getById(applianceDefinitionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getById(applianceDefinitionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applianceDefinitionId, - options - }, - getByIdOperationSpec, - callback) as Promise; - } - - /** - * Deletes the appliance definition. - * @param applianceDefinitionId The fully qualified ID of the appliance definition, including the - * appliance name and the appliance definition resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} - * @param [options] The optional parameters - * @returns Promise - */ - deleteById(applianceDefinitionId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteById(applianceDefinitionId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Creates a new appliance definition. - * @param applianceDefinitionId The fully qualified ID of the appliance definition, including the - * appliance name and the appliance definition resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} - * @param parameters Parameters supplied to the create or update an appliance definition. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdateById(applianceDefinitionId: string, parameters: Models.ApplianceDefinition, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdateById(applianceDefinitionId,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Deletes the appliance definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceDefinitionName The name of the appliance definition to delete. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, applianceDefinitionName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - applianceDefinitionName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Creates a new appliance definition. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceDefinitionName The name of the appliance definition. - * @param parameters Parameters supplied to the create or update an appliance definition. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, applianceDefinitionName: string, parameters: Models.ApplianceDefinition, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - applianceDefinitionName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Deletes the appliance definition. - * @param applianceDefinitionId The fully qualified ID of the appliance definition, including the - * appliance name and the appliance definition resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteById(applianceDefinitionId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - applianceDefinitionId, - options - }, - beginDeleteByIdOperationSpec, - options); - } - - /** - * Creates a new appliance definition. - * @param applianceDefinitionId The fully qualified ID of the appliance definition, including the - * appliance name and the appliance definition resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} - * @param parameters Parameters supplied to the create or update an appliance definition. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdateById(applianceDefinitionId: string, parameters: Models.ApplianceDefinition, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - applianceDefinitionId, - parameters, - options - }, - beginCreateOrUpdateByIdOperationSpec, - options); - } - - /** - * Lists the appliance definitions in a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applianceDefinitions/{applianceDefinitionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.applianceDefinitionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceDefinition - }, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applianceDefinitions", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceDefinitionListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{applianceDefinitionId}", - urlParameters: [ - Parameters.applianceDefinitionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceDefinition - }, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applianceDefinitions/{applianceDefinitionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.applianceDefinitionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applianceDefinitions/{applianceDefinitionName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.applianceDefinitionName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ApplianceDefinition, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ApplianceDefinition - }, - 201: { - bodyMapper: Mappers.ApplianceDefinition - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginDeleteByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{applianceDefinitionId}", - urlParameters: [ - Parameters.applianceDefinitionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginCreateOrUpdateByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "{applianceDefinitionId}", - urlParameters: [ - Parameters.applianceDefinitionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ApplianceDefinition, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ApplianceDefinition - }, - 201: { - bodyMapper: Mappers.ApplianceDefinition - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceDefinitionListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/appliances.ts b/sdk/managedapplications/arm-managedapplications/src/operations/appliances.ts deleted file mode 100644 index 0064b4426553..000000000000 --- a/sdk/managedapplications/arm-managedapplications/src/operations/appliances.ts +++ /dev/null @@ -1,716 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/appliancesMappers"; -import * as Parameters from "../models/parameters"; -import { ManagedApplicationClientContext } from "../managedApplicationClientContext"; - -/** Class representing a Appliances. */ -export class Appliances { - private readonly client: ManagedApplicationClientContext; - - /** - * Create a Appliances. - * @param {ManagedApplicationClientContext} client Reference to the service client. - */ - constructor(client: ManagedApplicationClientContext) { - this.client = client; - } - - /** - * Gets the appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, applianceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param callback The callback - */ - get(resourceGroupName: string, applianceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, applianceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, applianceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - applianceName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Deletes the appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, applianceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,applianceName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Creates a new appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param parameters Parameters supplied to the create or update an appliance. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, applianceName: string, parameters: Models.Appliance, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,applianceName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Updates an existing appliance. The only value that can be updated via PATCH currently is the - * tags. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, applianceName: string, options?: Models.AppliancesUpdateOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param callback The callback - */ - update(resourceGroupName: string, applianceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, applianceName: string, options: Models.AppliancesUpdateOptionalParams, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, applianceName: string, options?: Models.AppliancesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - applianceName, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Gets all the appliances within a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Gets all the appliances within a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * Gets the appliance. - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param [options] The optional parameters - * @returns Promise - */ - getById(applianceId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param callback The callback - */ - getById(applianceId: string, callback: msRest.ServiceCallback): void; - /** - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param options The optional parameters - * @param callback The callback - */ - getById(applianceId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getById(applianceId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applianceId, - options - }, - getByIdOperationSpec, - callback) as Promise; - } - - /** - * Deletes the appliance. - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param [options] The optional parameters - * @returns Promise - */ - deleteById(applianceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteById(applianceId,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Creates a new appliance. - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param parameters Parameters supplied to the create or update an appliance. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdateById(applianceId: string, parameters: Models.Appliance, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdateById(applianceId,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Updates an existing appliance. The only value that can be updated via PATCH currently is the - * tags. - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param [options] The optional parameters - * @returns Promise - */ - updateById(applianceId: string, options?: Models.AppliancesUpdateByIdOptionalParams): Promise; - /** - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param callback The callback - */ - updateById(applianceId: string, callback: msRest.ServiceCallback): void; - /** - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param options The optional parameters - * @param callback The callback - */ - updateById(applianceId: string, options: Models.AppliancesUpdateByIdOptionalParams, callback: msRest.ServiceCallback): void; - updateById(applianceId: string, options?: Models.AppliancesUpdateByIdOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applianceId, - options - }, - updateByIdOperationSpec, - callback) as Promise; - } - - /** - * Deletes the appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, applianceName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - applianceName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Creates a new appliance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applianceName The name of the appliance. - * @param parameters Parameters supplied to the create or update an appliance. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, applianceName: string, parameters: Models.Appliance, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - applianceName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Deletes the appliance. - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteById(applianceId: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - applianceId, - options - }, - beginDeleteByIdOperationSpec, - options); - } - - /** - * Creates a new appliance. - * @param applianceId The fully qualified ID of the appliance, including the appliance name and the - * appliance resource type. Use the format, - * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} - * @param parameters Parameters supplied to the create or update an appliance. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdateById(applianceId: string, parameters: Models.Appliance, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - applianceId, - parameters, - options - }, - beginCreateOrUpdateByIdOperationSpec, - options); - } - - /** - * Gets all the appliances within a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } - - /** - * Gets all the appliances within a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/appliances/{applianceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.applianceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Appliance - }, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/appliances/{applianceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.applianceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: [ - "options", - "parameters" - ], - mapper: Mappers.Appliance - }, - responses: { - 200: { - bodyMapper: Mappers.Appliance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/appliances", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Solutions/appliances", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{applianceId}", - urlParameters: [ - Parameters.applianceId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Appliance - }, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{applianceId}", - urlParameters: [ - Parameters.applianceId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: [ - "options", - "parameters" - ], - mapper: Mappers.Appliance - }, - responses: { - 200: { - bodyMapper: Mappers.Appliance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/appliances/{applianceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.applianceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/appliances/{applianceName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.applianceName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Appliance, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Appliance - }, - 201: { - bodyMapper: Mappers.Appliance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginDeleteByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{applianceId}", - urlParameters: [ - Parameters.applianceId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const beginCreateOrUpdateByIdOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "{applianceId}", - urlParameters: [ - Parameters.applianceId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Appliance, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Appliance - }, - 201: { - bodyMapper: Mappers.Appliance - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplianceListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts b/sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts new file mode 100644 index 000000000000..6f31a4da36b3 --- /dev/null +++ b/sdk/managedapplications/arm-managedapplications/src/operations/applicationDefinitions.ts @@ -0,0 +1,481 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/applicationDefinitionsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationClientContext } from "../applicationClientContext"; + +/** Class representing a ApplicationDefinitions. */ +export class ApplicationDefinitions { + private readonly client: ApplicationClientContext; + + /** + * Create a ApplicationDefinitions. + * @param {ApplicationClientContext} client Reference to the service client. + */ + constructor(client: ApplicationClientContext) { + this.client = client; + } + + /** + * Gets the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, applicationDefinitionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param callback The callback + */ + get(resourceGroupName: string, applicationDefinitionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, applicationDefinitionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, applicationDefinitionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + applicationDefinitionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, applicationDefinitionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,applicationDefinitionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param parameters Parameters supplied to the create or update an managed application definition. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, applicationDefinitionName: string, parameters: Models.ApplicationDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,applicationDefinitionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param parameters Parameters supplied to the update a managed application definition. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, applicationDefinitionName: string, parameters: Models.ApplicationDefinitionPatchable, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param parameters Parameters supplied to the update a managed application definition. + * @param callback The callback + */ + update(resourceGroupName: string, applicationDefinitionName: string, parameters: Models.ApplicationDefinitionPatchable, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param parameters Parameters supplied to the update a managed application definition. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, applicationDefinitionName: string, parameters: Models.ApplicationDefinitionPatchable, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, applicationDefinitionName: string, parameters: Models.ApplicationDefinitionPatchable, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + applicationDefinitionName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Lists the managed application definitions in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets all the application definitions within a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Deletes the managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, applicationDefinitionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + applicationDefinitionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Creates a new managed application definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationDefinitionName The name of the managed application definition. + * @param parameters Parameters supplied to the create or update an managed application definition. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, applicationDefinitionName: string, parameters: Models.ApplicationDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + applicationDefinitionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Lists the managed application definitions in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Gets all the application definitions within a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationDefinitionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationDefinitionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ApplicationDefinitionPatchable, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applicationDefinitions", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationDefinitionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationDefinitionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ApplicationDefinition, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ApplicationDefinition + }, + 201: { + bodyMapper: Mappers.ApplicationDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/applications.ts b/sdk/managedapplications/arm-managedapplications/src/operations/applications.ts new file mode 100644 index 000000000000..d4e09e03f273 --- /dev/null +++ b/sdk/managedapplications/arm-managedapplications/src/operations/applications.ts @@ -0,0 +1,586 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/applicationsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationClientContext } from "../applicationClientContext"; + +/** Class representing a Applications. */ +export class Applications { + private readonly client: ApplicationClientContext; + + /** + * Create a Applications. + * @param {ApplicationClientContext} client Reference to the service client. + */ + constructor(client: ApplicationClientContext) { + this.client = client; + } + + /** + * Gets the managed application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param callback The callback + */ + get(resourceGroupName: string, applicationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, applicationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + applicationName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the managed application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,applicationName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a new managed application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param parameters Parameters supplied to the create or update a managed application. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, applicationName: string, parameters: Models.Application, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,applicationName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an existing managed application. The only value that can be updated via PATCH currently + * is the tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, applicationName: string, options?: Models.ApplicationsUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param callback The callback + */ + update(resourceGroupName: string, applicationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, applicationName: string, options: Models.ApplicationsUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, applicationName: string, options?: Models.ApplicationsUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + applicationName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets all the applications within a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets all the applications within a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Refresh Permissions for application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param [options] The optional parameters + * @returns Promise + */ + refreshPermissions(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRefreshPermissions(resourceGroupName,applicationName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * List allowed upgrade plans for application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param [options] The optional parameters + * @returns Promise + */ + listAllowedUpgradePlans(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param callback The callback + */ + listAllowedUpgradePlans(resourceGroupName: string, applicationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param options The optional parameters + * @param callback The callback + */ + listAllowedUpgradePlans(resourceGroupName: string, applicationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listAllowedUpgradePlans(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + applicationName, + options + }, + listAllowedUpgradePlansOperationSpec, + callback); + } + + /** + * Deletes the managed application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + applicationName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Creates a new managed application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param parameters Parameters supplied to the create or update a managed application. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, applicationName: string, parameters: Models.Application, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + applicationName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Refresh Permissions for application. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationName The name of the managed application. + * @param [options] The optional parameters + * @returns Promise + */ + beginRefreshPermissions(resourceGroupName: string, applicationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + applicationName, + options + }, + beginRefreshPermissionsOperationSpec, + options); + } + + /** + * Gets all the applications within a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Gets all the applications within a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "parameters" + ], + mapper: Mappers.ApplicationPatchable + }, + responses: { + 200: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applications", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listAllowedUpgradePlansOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}/listAllowedUpgradePlans", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Application, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Application + }, + 201: { + bodyMapper: Mappers.Application + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginRefreshPermissionsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}/refreshPermissions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.applicationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ApplicationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/index.ts b/sdk/managedapplications/arm-managedapplications/src/operations/index.ts index 50be9cad72d1..84b1c63cd407 100644 --- a/sdk/managedapplications/arm-managedapplications/src/operations/index.ts +++ b/sdk/managedapplications/arm-managedapplications/src/operations/index.ts @@ -1,12 +1,12 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ -export * from "./appliances"; -export * from "./applianceDefinitions"; +export * from "./applications"; +export * from "./applicationDefinitions"; +export * from "./jitRequests"; diff --git a/sdk/managedapplications/arm-managedapplications/src/operations/jitRequests.ts b/sdk/managedapplications/arm-managedapplications/src/operations/jitRequests.ts new file mode 100644 index 000000000000..0043f4b60be9 --- /dev/null +++ b/sdk/managedapplications/arm-managedapplications/src/operations/jitRequests.ts @@ -0,0 +1,378 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jitRequestsMappers"; +import * as Parameters from "../models/parameters"; +import { ApplicationClientContext } from "../applicationClientContext"; + +/** Class representing a JitRequests. */ +export class JitRequests { + private readonly client: ApplicationClientContext; + + /** + * Create a JitRequests. + * @param {ApplicationClientContext} client Reference to the service client. + */ + constructor(client: ApplicationClientContext) { + this.client = client; + } + + /** + * Gets the JIT request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, jitRequestName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param callback The callback + */ + get(resourceGroupName: string, jitRequestName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, jitRequestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, jitRequestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + jitRequestName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the JIT request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param parameters Parameters supplied to the update JIT request. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, jitRequestName: string, parameters: Models.JitRequestDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,jitRequestName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates the JIT request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param parameters Parameters supplied to the update JIT request. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, jitRequestName: string, parameters: Models.JitRequestPatchable, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param parameters Parameters supplied to the update JIT request. + * @param callback The callback + */ + update(resourceGroupName: string, jitRequestName: string, parameters: Models.JitRequestPatchable, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param parameters Parameters supplied to the update JIT request. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, jitRequestName: string, parameters: Models.JitRequestPatchable, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, jitRequestName: string, parameters: Models.JitRequestPatchable, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + jitRequestName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the JIT request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, jitRequestName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, jitRequestName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, jitRequestName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, jitRequestName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + jitRequestName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Retrieves all JIT requests within the subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Retrieves all JIT requests within the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the JIT request. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jitRequestName The name of the JIT request. + * @param parameters Parameters supplied to the update JIT request. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, jitRequestName: string, parameters: Models.JitRequestDefinition, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + jitRequestName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jitRequestName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitRequestDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jitRequestName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.JitRequestPatchable, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JitRequestDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jitRequestName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Solutions/jitRequests", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitRequestDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JitRequestDefinitionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jitRequestName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.JitRequestDefinition, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.JitRequestDefinition + }, + 201: { + bodyMapper: Mappers.JitRequestDefinition + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/managedapplications/arm-managedapplications/tsconfig.json b/sdk/managedapplications/arm-managedapplications/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/managedapplications/arm-managedapplications/tsconfig.json +++ b/sdk/managedapplications/arm-managedapplications/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true