Skip to content

Commit

Permalink
CodeGen from PR 20062 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Review request for Microsoft.ContainerService to add version 2022-07-02-preview (Azure#20062)

* Adds base for updating Microsoft.ContainerService from version preview/2022-06-02-preview to version 2022-07-02-preview

* Updates readme

* Updates API version in new specs and examples

* update readmes (Azure#19872)

* Add example of Azure KeyVault Secrets Provider Addon for 2022-07-02-preview (Azure#19874)

* add example of kv secret provider addon

* fix

* fix lint

* move ADH GA type to preview (Azure#19904)

* move ADH GA type to preview

* fix prettier check issue

* add overlay vpa swagger (Azure#19936)

* add overlay vpa objects

* fix typo

* address comments

Co-authored-by: zhifanhui <zhifanhui@microsoft.com>

* Swagger API for Operation Abort (Azure#19971)

* Swagger API for Operation Abort

* Swagger changes updates for Abort operation based on validations

* Haitao/secured by perimeter0702 (Azure#19873)

* add SecuredByPerimeter in publicNetworkAccess

* update enum value descriptions

* Add support for ImageCleaner on AKS (Azure#19916)

* Add support for ImageCleaner on AKS

* add more context in ImageCleaner description

* add default for availableAgentPoolVersions (Azure#19902)

* Add Azure Monitor Metrics (Prometheus) Profile (Azure#19965)

* Add Azure Monitor Metrics (Prometheus) Profile

* spelling error

* restructure to names from rp

* commit to rerun build

* ksm metrics

Co-authored-by: Jianping Zeng <zjpjack@users.noreply.github.com>
Co-authored-by: huizhifan <60024380+huizhifan@users.noreply.github.com>
Co-authored-by: zhifanhui <zhifanhui@microsoft.com>
Co-authored-by: InduSridhar <InduSridhar@users.noreply.github.com>
Co-authored-by: Haitao Chen <haitch@users.noreply.github.com>
Co-authored-by: jiashun0011 <573255300@qq.com>
Co-authored-by: bragi92 <kadubey@microsoft.com>
  • Loading branch information
8 people committed Aug 18, 2022
1 parent 444fea4 commit 1986d3f
Show file tree
Hide file tree
Showing 15 changed files with 515 additions and 67 deletions.
4 changes: 2 additions & 2 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 18 additions & 12 deletions sdk/containerservice/arm-containerservice/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Release History

## 17.1.0-beta.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 17.1.0-beta.1 (2022-07-25)

## 17.1.0-beta.2 (2022-08-18)

**Features**

Expand All @@ -19,8 +9,11 @@
- Added operation group ManagedClusterSnapshots
- Added operation group TrustedAccessRoleBindings
- Added operation group TrustedAccessRoles
- Added operation AgentPools.abortLatestOperation
- Added operation ManagedClusters.abortLatestOperation
- Added operation ManagedClusters.beginRotateServiceAccountSigningKeys
- Added operation ManagedClusters.beginRotateServiceAccountSigningKeysAndWait
- Added Interface AgentPoolsAbortLatestOperationOptionalParams
- Added Interface AzureEntityResource
- Added Interface ErrorAdditionalInfo
- Added Interface ErrorDetail
Expand All @@ -47,10 +40,15 @@
- Added Interface FleetsListNextOptionalParams
- Added Interface FleetsListOptionalParams
- Added Interface FleetsUpdateOptionalParams
- Added Interface ManagedClusterAzureMonitorProfile
- Added Interface ManagedClusterAzureMonitorProfileKubeStateMetrics
- Added Interface ManagedClusterAzureMonitorProfileMetrics
- Added Interface ManagedClusterIngressProfile
- Added Interface ManagedClusterIngressProfileWebAppRouting
- Added Interface ManagedClusterOidcIssuerProfile
- Added Interface ManagedClusterPropertiesForSnapshot
- Added Interface ManagedClustersAbortLatestOperationOptionalParams
- Added Interface ManagedClusterSecurityProfileImageCleaner
- Added Interface ManagedClusterSecurityProfileNodeRestriction
- Added Interface ManagedClusterSecurityProfileWorkloadIdentity
- Added Interface ManagedClusterSnapshot
Expand All @@ -67,6 +65,7 @@
- Added Interface ManagedClusterStorageProfileBlobCSIDriver
- Added Interface ManagedClusterWorkloadAutoScalerProfile
- Added Interface ManagedClusterWorkloadAutoScalerProfileKeda
- Added Interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler
- Added Interface NetworkProfileForSnapshot
- Added Interface TrustedAccessRole
- Added Interface TrustedAccessRoleBinding
Expand All @@ -80,6 +79,7 @@
- Added Interface TrustedAccessRoleRule
- Added Interface TrustedAccessRolesListNextOptionalParams
- Added Interface TrustedAccessRolesListOptionalParams
- Added Type Alias ControlledValues
- Added Type Alias FleetMemberProvisioningState
- Added Type Alias FleetMembersCreateOrUpdateResponse
- Added Type Alias FleetMembersGetResponse
Expand Down Expand Up @@ -109,11 +109,13 @@
- Added Type Alias TrustedAccessRoleBindingsListResponse
- Added Type Alias TrustedAccessRolesListNextResponse
- Added Type Alias TrustedAccessRolesListResponse
- Added Type Alias UpdateMode
- Interface AgentPool has a new optional parameter capacityReservationGroupID
- Interface AgentPool has a new optional parameter enableCustomCATrust
- Interface AgentPool has a new optional parameter messageOfTheDay
- Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget
- Interface ContainerServiceNetworkProfile has a new optional parameter networkPluginMode
- Interface ManagedCluster has a new optional parameter azureMonitorProfile
- Interface ManagedCluster has a new optional parameter creationData
- Interface ManagedCluster has a new optional parameter enableNamespaceResources
- Interface ManagedCluster has a new optional parameter ingressProfile
Expand All @@ -126,6 +128,7 @@
- Interface ManagedClusterAPIServerAccessProfile has a new optional parameter subnetId
- Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy
- Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget
- Interface ManagedClusterSecurityProfile has a new optional parameter imageCleaner
- Interface ManagedClusterSecurityProfile has a new optional parameter nodeRestriction
- Interface ManagedClusterSecurityProfile has a new optional parameter workloadIdentity
- Interface ManagedClusterStorageProfile has a new optional parameter blobCSIDriver
Expand All @@ -135,12 +138,15 @@
- Class ContainerServiceClient has a new parameter managedClusterSnapshots
- Class ContainerServiceClient has a new parameter trustedAccessRoleBindings
- Class ContainerServiceClient has a new parameter trustedAccessRoles
- Added Enum KnownControlledValues
- Added Enum KnownFleetMemberProvisioningState
- Added Enum KnownFleetProvisioningState
- Added Enum KnownNetworkPluginMode
- Added Enum KnownTrustedAccessRoleBindingProvisioningState
- Added Enum KnownUpdateMode
- Enum KnownOssku has a new value Windows2019
- Enum KnownOssku has a new value Windows2022
- Enum KnownPublicNetworkAccess has a new value SecuredByPerimeter
- Enum KnownSnapshotType has a new value ManagedCluster


Expand Down
8 changes: 4 additions & 4 deletions sdk/containerservice/arm-containerservice/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "405811c51aa09803caedfe17fd305e110db1ca5e",
"commit": "7a2aa128581acaf122fcd2bda013f89aa1ecd916",
"readme": "specification/containerservice/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.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\\containerservice\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220720.1 --generate-sample=true",
"autorest_command": "autorest --version=3.8.4 --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/containerservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.0",
"use": "@autorest/typescript@6.0.0-rc.1.20220720.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/typescript@6.0.0-rc.1"
}
14 changes: 3 additions & 11 deletions sdk/containerservice/arm-containerservice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"mkdirp": "^1.0.4",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.6.0",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
Expand Down Expand Up @@ -109,13 +109,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview"
}
}
"autoPublish": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export type AgentPoolMode = string;

// @public
export interface AgentPools {
abortLatestOperation(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsAbortLatestOperationOptionalParams): Promise<void>;
beginCreateOrUpdate(resourceGroupName: string, resourceName: string, agentPoolName: string, parameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AgentPoolsCreateOrUpdateResponse>, AgentPoolsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, agentPoolName: string, parameters: AgentPool, options?: AgentPoolsCreateOrUpdateOptionalParams): Promise<AgentPoolsCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
Expand All @@ -100,6 +101,10 @@ export interface AgentPools {
list(resourceGroupName: string, resourceName: string, options?: AgentPoolsListOptionalParams): PagedAsyncIterableIterator<AgentPool>;
}

// @public
export interface AgentPoolsAbortLatestOperationOptionalParams extends coreClient.OperationOptions {
}

// @public
export interface AgentPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
Expand Down Expand Up @@ -327,6 +332,9 @@ export interface ContainerServiceVMDiagnostics {
// @public
export type ContainerServiceVMSizeTypes = string;

// @public
export type ControlledValues = string;

// @public
export type Count = 1 | 3 | 5;

Expand Down Expand Up @@ -804,6 +812,12 @@ export enum KnownContainerServiceVMSizeTypes {
StandardNV6 = "Standard_NV6"
}

// @public
export enum KnownControlledValues {
RequestsAndLimits = "RequestsAndLimits",
RequestsOnly = "RequestsOnly"
}

// @public
export enum KnownCreatedByType {
Application = "Application",
Expand Down Expand Up @@ -972,7 +986,8 @@ export enum KnownPrivateEndpointConnectionProvisioningState {
// @public
export enum KnownPublicNetworkAccess {
Disabled = "Disabled",
Enabled = "Enabled"
Enabled = "Enabled",
SecuredByPerimeter = "SecuredByPerimeter"
}

// @public
Expand Down Expand Up @@ -1007,6 +1022,14 @@ export enum KnownTrustedAccessRoleBindingProvisioningState {
Updating = "Updating"
}

// @public
export enum KnownUpdateMode {
Auto = "Auto",
Initial = "Initial",
Off = "Off",
Recreate = "Recreate"
}

// @public
export enum KnownUpgradeChannel {
NodeImage = "node-image",
Expand Down Expand Up @@ -1128,6 +1151,7 @@ export interface ManagedCluster extends TrackedResource {
apiServerAccessProfile?: ManagedClusterAPIServerAccessProfile;
autoScalerProfile?: ManagedClusterPropertiesAutoScalerProfile;
autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile;
azureMonitorProfile?: ManagedClusterAzureMonitorProfile;
readonly azurePortalFqdn?: string;
creationData?: CreationData;
readonly currentKubernetesVersion?: string;
Expand Down Expand Up @@ -1268,6 +1292,23 @@ export interface ManagedClusterAutoUpgradeProfile {
upgradeChannel?: UpgradeChannel;
}

// @public
export interface ManagedClusterAzureMonitorProfile {
metrics?: ManagedClusterAzureMonitorProfileMetrics;
}

// @public
export interface ManagedClusterAzureMonitorProfileKubeStateMetrics {
metricAnnotationsAllowList?: string;
metricLabelsAllowlist?: string;
}

// @public
export interface ManagedClusterAzureMonitorProfileMetrics {
enabled: boolean;
kubeStateMetrics?: ManagedClusterAzureMonitorProfileKubeStateMetrics;
}

// @public
export interface ManagedClusterHttpProxyConfig {
readonly effectiveNoProxy?: string[];
Expand Down Expand Up @@ -1442,6 +1483,7 @@ export interface ManagedClusterPropertiesForSnapshot {

// @public
export interface ManagedClusters {
abortLatestOperation(resourceGroupName: string, resourceName: string, options?: ManagedClustersAbortLatestOperationOptionalParams): Promise<void>;
beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<ManagedClustersCreateOrUpdateResponse>, ManagedClustersCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise<ManagedClustersCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, resourceName: string, options?: ManagedClustersDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
Expand Down Expand Up @@ -1475,6 +1517,10 @@ export interface ManagedClusters {
listOutboundNetworkDependenciesEndpoints(resourceGroupName: string, resourceName: string, options?: ManagedClustersListOutboundNetworkDependenciesEndpointsOptionalParams): PagedAsyncIterableIterator<OutboundEnvironmentEndpoint>;
}

// @public
export interface ManagedClustersAbortLatestOperationOptionalParams extends coreClient.OperationOptions {
}

// @public
export interface ManagedClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
Expand All @@ -1495,6 +1541,7 @@ export interface ManagedClustersDeleteOptionalParams extends coreClient.Operatio
export interface ManagedClusterSecurityProfile {
azureKeyVaultKms?: AzureKeyVaultKms;
defender?: ManagedClusterSecurityProfileDefender;
imageCleaner?: ManagedClusterSecurityProfileImageCleaner;
nodeRestriction?: ManagedClusterSecurityProfileNodeRestriction;
workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity;
}
Expand All @@ -1510,6 +1557,12 @@ export interface ManagedClusterSecurityProfileDefenderSecurityMonitoring {
enabled?: boolean;
}

// @public
export interface ManagedClusterSecurityProfileImageCleaner {
enabled?: boolean;
intervalHours?: number;
}

// @public
export interface ManagedClusterSecurityProfileNodeRestriction {
enabled?: boolean;
Expand Down Expand Up @@ -1821,13 +1874,22 @@ export interface ManagedClusterWindowsProfile {
// @public
export interface ManagedClusterWorkloadAutoScalerProfile {
keda?: ManagedClusterWorkloadAutoScalerProfileKeda;
// (undocumented)
verticalPodAutoscaler?: ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler;
}

// @public
export interface ManagedClusterWorkloadAutoScalerProfileKeda {
enabled: boolean;
}

// @public (undocumented)
export interface ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler {
controlledValues: ControlledValues;
enabled: boolean;
updateMode: UpdateMode;
}

// @public (undocumented)
export interface ManagedServiceIdentityUserAssignedIdentitiesValue {
readonly clientId?: string;
Expand Down Expand Up @@ -2332,6 +2394,9 @@ export interface TrustedAccessRolesListOptionalParams extends coreClient.Operati
// @public
export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult;

// @public
export type UpdateMode = string;

// @public
export type UpgradeChannel = string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,41 +98,34 @@ export class ContainerServiceClient extends coreClient.ServiceClient {
};
super(optionsWithDefaults);

let bearerTokenAuthenticationPolicyFound: boolean = false;
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
}
if (
!options ||
!options.pipeline ||
options.pipeline.getOrderedPolicies().length == 0 ||
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
credential: credentials,
scopes: `${optionsWithDefaults.credentialScopes}`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments
this.subscriptionId = subscriptionId;

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-06-02-preview";
this.apiVersion = options.apiVersion || "2022-07-02-preview";
this.operations = new OperationsImpl(this);
this.managedClusters = new ManagedClustersImpl(this);
this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this);
Expand Down
Loading

0 comments on commit 1986d3f

Please sign in to comment.