Skip to content

Commit

Permalink
CodeGen from PR 25714 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge a287b5f3c4c1741695549276678715bb42bb1497 into 0689d8abd87491083134cf67f90d2e57778b2214
  • Loading branch information
SDKAuto committed Sep 7, 2023
1 parent c6e3b65 commit f7ea24f
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 39 deletions.
8 changes: 4 additions & 4 deletions sdk/keyvault/arm-keyvault/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "6b992c049ed7d6a95465d5c0a2234fc54c87b9bf",
"commit": "2948a0cc7aa5a907f788151647fe54bb6ddd38a7",
"readme": "specification/keyvault/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\keyvault\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/keyvault/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/typescript@6.0.0-rc.10"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.2",
"use": "@autorest/typescript@^6.0.4"
}
20 changes: 6 additions & 14 deletions sdk/keyvault/arm-keyvault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.0",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-rest-pipeline": "^1.12.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand Down Expand Up @@ -48,8 +48,8 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0"
"ts-node": "^10.0.0",
"@azure/dev-tool": "^1.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -112,13 +112,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/keyvault/arm-keyvault",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-keyvault?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/keyvault/arm-keyvault"
}
4 changes: 2 additions & 2 deletions sdk/keyvault/arm-keyvault/review/arm-keyvault.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export interface KeyReleasePolicy {
}

// @public
export type KeyRotationPolicyActionType = "rotate" | "notify";
export type KeyRotationPolicyActionType = "Rotate" | "Notify";

// @public (undocumented)
export interface KeyRotationPolicyAttributes {
Expand Down Expand Up @@ -832,7 +832,7 @@ export interface ManagedHsmSku {
export type ManagedHsmSkuFamily = string;

// @public
export type ManagedHsmSkuName = "Standard_B1" | "Custom_B32";
export type ManagedHsmSkuName = "Standard_B1" | "Custom_B32" | "Custom_B6";

// @public
export interface ManagedHsmsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
Expand Down
16 changes: 8 additions & 8 deletions sdk/keyvault/arm-keyvault/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface Trigger {
}

export interface Action {
/** The type of action. */
/** The type of the action. The value should be compared case-insensitively. */
type?: KeyRotationPolicyActionType;
}

Expand Down Expand Up @@ -268,7 +268,7 @@ export interface ManagedHsmTrigger {
}

export interface ManagedHsmAction {
/** The type of action. */
/** The type of the action. The value should be compared case-insensitively. */
type?: KeyRotationPolicyActionType;
}

Expand Down Expand Up @@ -700,11 +700,11 @@ export interface ManagedHsmProperties {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly hsmUri?: string;
/** Property to specify whether the 'soft delete' functionality is enabled for this managed HSM pool. If it's not set to any value(true or false) when creating new managed HSM pool, it will be set to true by default. Once set to true, it cannot be reverted to false. */
/** Property to specify whether the 'soft delete' functionality is enabled for this managed HSM pool. Soft delete is enabled by default for all managed HSMs and is immutable. */
enableSoftDelete?: boolean;
/** softDelete data retention days. It accepts >=7 and <=90. */
/** Soft deleted data retention days. When you delete an HSM or a key, it will remain recoverable for the configured retention period or for a default period of 90 days. It accepts values between 7 and 90. */
softDeleteRetentionInDays?: number;
/** Property specifying whether protection against purge is enabled for this managed HSM pool. Setting this property to true activates protection against purge for this managed HSM pool and its content - only the Managed HSM service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible. */
/** Property specifying whether protection against purge is enabled for this managed HSM pool. Setting this property to true activates protection against purge for this managed HSM pool and its content - only the Managed HSM service may initiate a hard, irrecoverable deletion. Enabling this functionality is irreversible. */
enablePurgeProtection?: boolean;
/** The create mode to indicate whether the resource is being created or is being recovered from a deleted resource. */
createMode?: CreateMode;
Expand All @@ -727,7 +727,7 @@ export interface ManagedHsmProperties {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly privateEndpointConnections?: MhsmPrivateEndpointConnectionItem[];
/** Control permission for data plane traffic coming from public networks while private endpoint is enabled. */
/** Control permission to the managed HSM from public networks. */
publicNetworkAccess?: PublicNetworkAccess;
/**
* The scheduled purge date in UTC.
Expand Down Expand Up @@ -1976,7 +1976,7 @@ export enum KnownManagedHsmSkuFamily {
*/
export type ManagedHsmSkuFamily = string;
/** Defines values for KeyRotationPolicyActionType. */
export type KeyRotationPolicyActionType = "rotate" | "notify";
export type KeyRotationPolicyActionType = "Rotate" | "Notify";
/** Defines values for SkuName. */
export type SkuName = "standard" | "premium";
/** Defines values for CreateMode. */
Expand All @@ -1986,7 +1986,7 @@ export type AccessPolicyUpdateKind = "add" | "replace" | "remove";
/** Defines values for Reason. */
export type Reason = "AccountNameInvalid" | "AlreadyExists";
/** Defines values for ManagedHsmSkuName. */
export type ManagedHsmSkuName = "Standard_B1" | "Custom_B32";
export type ManagedHsmSkuName = "Standard_B1" | "Custom_B32" | "Custom_B6";

/** Optional parameters. */
export interface KeysCreateIfNotExistOptionalParams
Expand Down
7 changes: 4 additions & 3 deletions sdk/keyvault/arm-keyvault/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const Action: coreClient.CompositeMapper = {
serializedName: "type",
type: {
name: "Enum",
allowedValues: ["rotate", "notify"]
allowedValues: ["Rotate", "Notify"]
}
}
}
Expand Down Expand Up @@ -667,7 +667,7 @@ export const ManagedHsmAction: coreClient.CompositeMapper = {
serializedName: "type",
type: {
name: "Enum",
allowedValues: ["rotate", "notify"]
allowedValues: ["Rotate", "Notify"]
}
}
}
Expand Down Expand Up @@ -1867,6 +1867,7 @@ export const ManagedHsmProperties: coreClient.CompositeMapper = {
}
},
publicNetworkAccess: {
defaultValue: "Enabled",
serializedName: "publicNetworkAccess",
type: {
name: "String"
Expand Down Expand Up @@ -2176,7 +2177,7 @@ export const ManagedHsmSku: coreClient.CompositeMapper = {
required: true,
type: {
name: "Enum",
allowedValues: ["Standard_B1", "Custom_B32"]
allowedValues: ["Standard_B1", "Custom_B32", "Custom_B6"]
}
}
}
Expand Down
43 changes: 43 additions & 0 deletions sdk/keyvault/arm-keyvault/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import {
Recorder,
RecorderStartOptions,
env
} from "@azure-tools/test-recorder";
import { assert } from "chai";
import { Context } from "mocha";

const replaceableVariables: Record<string, string> = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
};

const recorderOptions: RecorderStartOptions = {
envSetupForPlayback: replaceableVariables
};

describe("My test", () => {
let recorder: Recorder;

beforeEach(async function(this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});

afterEach(async function() {
await recorder.stop();
});

it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});
10 changes: 2 additions & 8 deletions sdk/keyvault/arm-keyvault/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-keyvault": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down

0 comments on commit f7ea24f

Please sign in to comment.