diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index c765b167fede..65119fe70953 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,5 +1,50 @@ # Release History +## 19.5.0 (2023-11-17) + +**Features** + + - Added operation group TrustedAccessRoleBindings + - Added operation group TrustedAccessRoles + - Added Interface AgentPoolNetworkProfile + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface IPTag + - Added Interface PortRange + - Added Interface TrustedAccessRole + - Added Interface TrustedAccessRoleBinding + - Added Interface TrustedAccessRoleBindingListResult + - Added Interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + - Added Interface TrustedAccessRoleBindingsDeleteHeaders + - Added Interface TrustedAccessRoleBindingsDeleteOptionalParams + - Added Interface TrustedAccessRoleBindingsGetOptionalParams + - Added Interface TrustedAccessRoleBindingsListNextOptionalParams + - Added Interface TrustedAccessRoleBindingsListOptionalParams + - Added Interface TrustedAccessRoleListResult + - Added Interface TrustedAccessRoleRule + - Added Interface TrustedAccessRolesListNextOptionalParams + - Added Interface TrustedAccessRolesListOptionalParams + - Added Type Alias BackendPoolType + - Added Type Alias Protocol + - Added Type Alias TrustedAccessRoleBindingProvisioningState + - Added Type Alias TrustedAccessRoleBindingsCreateOrUpdateResponse + - Added Type Alias TrustedAccessRoleBindingsDeleteResponse + - Added Type Alias TrustedAccessRoleBindingsGetResponse + - Added Type Alias TrustedAccessRoleBindingsListNextResponse + - Added Type Alias TrustedAccessRoleBindingsListResponse + - Added Type Alias TrustedAccessRolesListNextResponse + - Added Type Alias TrustedAccessRolesListResponse + - Interface AgentPool has a new optional parameter capacityReservationGroupID + - Interface AgentPool has a new optional parameter networkProfile + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter capacityReservationGroupID + - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter networkProfile + - Interface ManagedClusterLoadBalancerProfile has a new optional parameter backendPoolType + - Added Enum KnownBackendPoolType + - Added Enum KnownProtocol + - Added Enum KnownTrustedAccessRoleBindingProvisioningState + + ## 19.4.0 (2023-10-20) **Features** diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index a3f34f40812b..66be7ed6a935 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "8c49a56458eeb093c0a6dee16e9b71ccdda0a888", + "commit": "577a492ba5989a268a6a0d0f5d0d5aa27fc4416a", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.11 --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/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", - "use": "@autorest/typescript@6.0.11" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 4c348267e963..aa3aa5f25fd2 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerServiceClient.", - "version": "19.4.0", + "version": "19.5.0", "engines": { "node": ">=18.0.0" }, @@ -34,6 +34,7 @@ "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -44,8 +45,7 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "ts-node": "^10.0.0", - "@azure/dev-tool": "^1.0.0" + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -107,13 +107,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice" +} \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md index f8036e050376..7a868876e80f 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -19,6 +19,7 @@ export interface AbsoluteMonthlySchedule { // @public export interface AgentPool extends SubResource { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; @@ -36,6 +37,7 @@ export interface AgentPool extends SubResource { maxPods?: number; minCount?: number; mode?: AgentPoolMode; + networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; nodeLabels?: { [propertyName: string]: string; @@ -89,6 +91,13 @@ export interface AgentPoolListResult { // @public export type AgentPoolMode = string; +// @public +export interface AgentPoolNetworkProfile { + allowedHostPorts?: PortRange[]; + applicationSecurityGroups?: string[]; + nodePublicIPTags?: IPTag[]; +} + // @public export interface AgentPools { beginAbortLatestOperation(resourceGroupName: string, resourceName: string, agentPoolName: string, options?: AgentPoolsAbortLatestOperationOptionalParams): Promise, AgentPoolsAbortLatestOperationResponse>>; @@ -223,6 +232,9 @@ export interface AzureKeyVaultKms { keyVaultResourceId?: string; } +// @public +export type BackendPoolType = string; + // @public export interface CloudError { error?: CloudErrorBody; @@ -278,6 +290,10 @@ export class ContainerServiceClient extends coreClient.ServiceClient { snapshots: Snapshots; // (undocumented) subscriptionId: string; + // (undocumented) + trustedAccessRoleBindings: TrustedAccessRoleBindings; + // (undocumented) + trustedAccessRoles: TrustedAccessRoles; } // @public @@ -374,6 +390,26 @@ export interface EndpointDetail { protocol?: string; } +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export type Expander = string; @@ -398,6 +434,12 @@ export type GPUInstanceProfile = string; // @public export type IpFamily = string; +// @public +export interface IPTag { + ipTagType?: string; + tag?: string; +} + // @public export interface IstioCertificateAuthority { plugin?: IstioPluginCertificateAuthority; @@ -457,6 +499,12 @@ export enum KnownAgentPoolType { VirtualMachineScaleSets = "VirtualMachineScaleSets" } +// @public +export enum KnownBackendPoolType { + NodeIP = "NodeIP", + NodeIPConfiguration = "NodeIPConfiguration" +} + // @public export enum KnownCode { Running = "Running", @@ -647,6 +695,12 @@ export enum KnownPrivateEndpointConnectionProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownProtocol { + TCP = "TCP", + UDP = "UDP" +} + // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", @@ -682,6 +736,15 @@ export enum KnownSnapshotType { NodePool = "NodePool" } +// @public +export enum KnownTrustedAccessRoleBindingProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownType { First = "First", @@ -929,6 +992,7 @@ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolP // @public export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; + capacityReservationGroupID?: string; count?: number; creationData?: CreationData; readonly currentOrchestratorVersion?: string; @@ -946,6 +1010,7 @@ export interface ManagedClusterAgentPoolProfileProperties { maxPods?: number; minCount?: number; mode?: AgentPoolMode; + networkProfile?: AgentPoolNetworkProfile; readonly nodeImageVersion?: string; nodeLabels?: { [propertyName: string]: string; @@ -1037,6 +1102,7 @@ export interface ManagedClusterListResult { // @public export interface ManagedClusterLoadBalancerProfile { allocatedOutboundPorts?: number; + backendPoolType?: BackendPoolType; effectiveOutboundIPs?: ResourceReference[]; enableMultipleStandardLoadBalancers?: boolean; idleTimeoutInMinutes?: number; @@ -1739,6 +1805,13 @@ export interface OutboundEnvironmentEndpointCollection { // @public export type OutboundType = string; +// @public +export interface PortRange { + portEnd?: number; + portStart?: number; + protocol?: Protocol; +} + // @public export interface PowerState { code?: Code; @@ -1836,6 +1909,9 @@ export interface PrivateLinkServiceConnectionState { status?: ConnectionStatus; } +// @public +export type Protocol = string; + // @public export interface ProxyResource extends Resource { } @@ -2082,6 +2158,117 @@ export interface TrackedResource extends Resource { }; } +// @public +export interface TrustedAccessRole { + readonly name?: string; + readonly rules?: TrustedAccessRoleRule[]; + readonly sourceResourceType?: string; +} + +// @public +export interface TrustedAccessRoleBinding extends Resource { + readonly provisioningState?: TrustedAccessRoleBindingProvisioningState; + roles: string[]; + sourceResourceId: string; +} + +// @public +export interface TrustedAccessRoleBindingListResult { + readonly nextLink?: string; + value?: TrustedAccessRoleBinding[]; +} + +// @public +export type TrustedAccessRoleBindingProvisioningState = string; + +// @public +export interface TrustedAccessRoleBindings { + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, trustedAccessRoleBinding: TrustedAccessRoleBinding, options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams): Promise, TrustedAccessRoleBindingsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, trustedAccessRoleBinding: TrustedAccessRoleBinding, options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, options?: TrustedAccessRoleBindingsDeleteOptionalParams): Promise, TrustedAccessRoleBindingsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, options?: TrustedAccessRoleBindingsDeleteOptionalParams): Promise; + get(resourceGroupName: string, resourceName: string, trustedAccessRoleBindingName: string, options?: TrustedAccessRoleBindingsGetOptionalParams): Promise; + list(resourceGroupName: string, resourceName: string, options?: TrustedAccessRoleBindingsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TrustedAccessRoleBindingsCreateOrUpdateResponse = TrustedAccessRoleBinding; + +// @public +export interface TrustedAccessRoleBindingsDeleteHeaders { + location?: string; +} + +// @public +export interface TrustedAccessRoleBindingsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TrustedAccessRoleBindingsDeleteResponse = TrustedAccessRoleBindingsDeleteHeaders; + +// @public +export interface TrustedAccessRoleBindingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsGetResponse = TrustedAccessRoleBinding; + +// @public +export interface TrustedAccessRoleBindingsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsListNextResponse = TrustedAccessRoleBindingListResult; + +// @public +export interface TrustedAccessRoleBindingsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRoleBindingsListResponse = TrustedAccessRoleBindingListResult; + +// @public +export interface TrustedAccessRoleListResult { + readonly nextLink?: string; + readonly value?: TrustedAccessRole[]; +} + +// @public +export interface TrustedAccessRoleRule { + readonly apiGroups?: string[]; + readonly nonResourceURLs?: string[]; + readonly resourceNames?: string[]; + readonly resources?: string[]; + readonly verbs?: string[]; +} + +// @public +export interface TrustedAccessRoles { + list(location: string, options?: TrustedAccessRolesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TrustedAccessRolesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; + +// @public +export interface TrustedAccessRolesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; + // @public export type Type = string; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index d20685aa4259..3f2e3c14a932 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -22,7 +22,9 @@ import { PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ResolvePrivateLinkServiceIdImpl, - SnapshotsImpl + SnapshotsImpl, + TrustedAccessRoleBindingsImpl, + TrustedAccessRolesImpl } from "./operations"; import { Operations, @@ -32,7 +34,9 @@ import { PrivateEndpointConnections, PrivateLinkResources, ResolvePrivateLinkServiceId, - Snapshots + Snapshots, + TrustedAccessRoleBindings, + TrustedAccessRoles } from "./operationsInterfaces"; import { ContainerServiceClientOptionalParams } from "./models"; @@ -44,7 +48,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { /** * Initializes a new instance of the ContainerServiceClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( @@ -68,7 +72,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/19.4.0`; + const packageDetails = `azsdk-js-arm-containerservice/19.5.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -121,7 +125,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-08-01"; + this.apiVersion = options.apiVersion || "2023-11-01"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); @@ -132,6 +136,8 @@ export class ContainerServiceClient extends coreClient.ServiceClient { this ); this.snapshots = new SnapshotsImpl(this); + this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsImpl(this); + this.trustedAccessRoles = new TrustedAccessRolesImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -171,4 +177,6 @@ export class ContainerServiceClient extends coreClient.ServiceClient { privateLinkResources: PrivateLinkResources; resolvePrivateLinkServiceId: ResolvePrivateLinkServiceId; snapshots: Snapshots; + trustedAccessRoleBindings: TrustedAccessRoleBindings; + trustedAccessRoles: TrustedAccessRoles; } diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 03010fa39ddf..7df98601047d 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -298,8 +298,12 @@ export interface ManagedClusterAgentPoolProfileProperties { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; + /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ + capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; } /** Settings for upgrading an agentpool */ @@ -414,6 +418,34 @@ export interface CreationData { sourceResourceId?: string; } +/** Network settings of an agent pool. */ +export interface AgentPoolNetworkProfile { + /** IPTags of instance-level public IPs. */ + nodePublicIPTags?: IPTag[]; + /** The port ranges that are allowed to access. The specified ranges are allowed to overlap. */ + allowedHostPorts?: PortRange[]; + /** The IDs of the application security groups which agent pool will associate when created. */ + applicationSecurityGroups?: string[]; +} + +/** Contains the IPTag associated with the object. */ +export interface IPTag { + /** The IP tag type. Example: RoutingPreference. */ + ipTagType?: string; + /** The value of the IP tag associated with the public IP. Example: Internet. */ + tag?: string; +} + +/** The port range. */ +export interface PortRange { + /** The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. */ + portStart?: number; + /** The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart. */ + portEnd?: number; + /** The network protocol of the port. */ + protocol?: Protocol; +} + /** Profile for Linux VMs in the container service cluster. */ export interface ContainerServiceLinuxProfile { /** The administrator username to use for Linux VMs. */ @@ -614,6 +646,8 @@ export interface ManagedClusterLoadBalancerProfile { idleTimeoutInMinutes?: number; /** Enable multiple standard load balancers per AKS cluster or not. */ enableMultipleStandardLoadBalancers?: boolean; + /** The type of the managed inbound Load Balancer BackendPool. */ + backendPoolType?: BackendPoolType; } /** Desired managed outbound IPs for the cluster load balancer. */ @@ -976,7 +1010,7 @@ export interface IstioPluginCertificateAuthority { /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -1471,6 +1505,128 @@ export interface MeshUpgradeProfileList { readonly nextLink?: string; } +/** List of trusted access role bindings */ +export interface TrustedAccessRoleBindingListResult { + /** Role binding list */ + value?: TrustedAccessRoleBinding[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** 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; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + 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[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** List of trusted access roles */ +export interface TrustedAccessRoleListResult { + /** + * Role list + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TrustedAccessRole[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Trusted access role definition. */ +export interface TrustedAccessRole { + /** + * Resource type of Azure resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceResourceType?: string; + /** + * Name of role, name is unique under a source resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rules?: TrustedAccessRoleRule[]; +} + +/** Rule for trusted access role */ +export interface TrustedAccessRoleRule { + /** + * List of allowed verbs + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly verbs?: string[]; + /** + * List of allowed apiGroups + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiGroups?: string[]; + /** + * List of allowed resources + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resources?: string[]; + /** + * List of allowed names + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceNames?: string[]; + /** + * List of allowed nonResourceURLs + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nonResourceURLs?: string[]; +} + /** Profile for the container service agent pool. */ export interface ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoolProfileProperties { @@ -1493,6 +1649,19 @@ export interface TrackedResource extends Resource { /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} +/** Defines binding between a resource and role */ +export interface TrustedAccessRoleBinding extends Resource { + /** + * The current provisioning state of trusted access role binding. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: TrustedAccessRoleBindingProvisioningState; + /** The ARM resource ID of source resource that trusted access is configured for. */ + sourceResourceId: string; + /** A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. */ + roles: string[]; +} + /** See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned maintenance. */ export interface MaintenanceConfiguration extends SubResource { /** @@ -1599,8 +1768,12 @@ export interface AgentPool extends SubResource { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; + /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ + capacityReservationGroupID?: string; /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ hostGroupID?: string; + /** Network-related settings of an agent pool. */ + networkProfile?: AgentPoolNetworkProfile; } /** Mesh upgrade profile properties for a major.minor release. */ @@ -1855,6 +2028,12 @@ export interface AgentPoolsUpgradeNodeImageVersionHeaders { azureAsyncOperation?: string; } +/** Defines headers for TrustedAccessRoleBindings_delete operation. */ +export interface TrustedAccessRoleBindingsDeleteHeaders { + /** URL to query for status of the operation. */ + location?: string; +} + /** Known values of {@link KubernetesSupportPlan} that the service accepts. */ export enum KnownKubernetesSupportPlan { /** Support for the version is the same as for the open source Kubernetes offering. Official Kubernetes open source community support versions for 1 year after release. */ @@ -2158,6 +2337,24 @@ export enum KnownGPUInstanceProfile { */ export type GPUInstanceProfile = string; +/** Known values of {@link Protocol} that the service accepts. */ +export enum KnownProtocol { + /** TCP protocol. */ + TCP = "TCP", + /** UDP protocol. */ + UDP = "UDP" +} + +/** + * Defines values for Protocol. \ + * {@link KnownProtocol} can be used interchangeably with Protocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TCP**: TCP protocol. \ + * **UDP**: UDP protocol. + */ +export type Protocol = string; + /** Known values of {@link LicenseType} that the service accepts. */ export enum KnownLicenseType { /** No additional licensing is applied. */ @@ -2341,6 +2538,24 @@ export enum KnownLoadBalancerSku { */ export type LoadBalancerSku = string; +/** Known values of {@link BackendPoolType} that the service accepts. */ +export enum KnownBackendPoolType { + /** The type of the managed inbound Load Balancer BackendPool. https:\//cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. */ + NodeIPConfiguration = "NodeIPConfiguration", + /** The type of the managed inbound Load Balancer BackendPool. https:\//cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. */ + NodeIP = "NodeIP" +} + +/** + * Defines values for BackendPoolType. \ + * {@link KnownBackendPoolType} can be used interchangeably with BackendPoolType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NodeIPConfiguration**: The type of the managed inbound Load Balancer BackendPool. https:\/\/cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. \ + * **NodeIP**: The type of the managed inbound Load Balancer BackendPool. https:\/\/cloud-provider-azure.sigs.k8s.io\/topics\/loadbalancer\/#configure-load-balancer-backend. + */ +export type BackendPoolType = string; + /** Known values of {@link IpFamily} that the service accepts. */ export enum KnownIpFamily { /** IPv4 */ @@ -2670,6 +2885,33 @@ export enum KnownSnapshotType { * **NodePool**: The snapshot is a snapshot of a node pool. */ export type SnapshotType = string; + +/** Known values of {@link TrustedAccessRoleBindingProvisioningState} that the service accepts. */ +export enum KnownTrustedAccessRoleBindingProvisioningState { + /** Canceled */ + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** Updating */ + Updating = "Updating" +} + +/** + * Defines values for TrustedAccessRoleBindingProvisioningState. \ + * {@link KnownTrustedAccessRoleBindingProvisioningState} can be used interchangeably with TrustedAccessRoleBindingProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Canceled** \ + * **Deleting** \ + * **Failed** \ + * **Succeeded** \ + * **Updating** + */ +export type TrustedAccessRoleBindingProvisioningState = string; /** Defines values for ResourceIdentityType. */ export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "None"; @@ -3176,6 +3418,65 @@ export interface SnapshotsListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type SnapshotsListByResourceGroupNextResponse = SnapshotListResult; +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type TrustedAccessRoleBindingsListResponse = TrustedAccessRoleBindingListResult; + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TrustedAccessRoleBindingsGetResponse = TrustedAccessRoleBinding; + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type TrustedAccessRoleBindingsCreateOrUpdateResponse = TrustedAccessRoleBinding; + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type TrustedAccessRoleBindingsDeleteResponse = TrustedAccessRoleBindingsDeleteHeaders; + +/** Optional parameters. */ +export interface TrustedAccessRoleBindingsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TrustedAccessRoleBindingsListNextResponse = TrustedAccessRoleBindingListResult; + +/** Optional parameters. */ +export interface TrustedAccessRolesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type TrustedAccessRolesListResponse = TrustedAccessRoleListResult; + +/** Optional parameters. */ +export interface TrustedAccessRolesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type TrustedAccessRolesListNextResponse = TrustedAccessRoleListResult; + /** Optional parameters. */ export interface ContainerServiceClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 1b675866c9e4..4a8d971b7c2a 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -763,11 +763,24 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "hostGroupID", type: { name: "String" } + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "AgentPoolNetworkProfile" + } } } } @@ -1119,6 +1132,106 @@ export const CreationData: coreClient.CompositeMapper = { } }; +export const AgentPoolNetworkProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AgentPoolNetworkProfile", + modelProperties: { + nodePublicIPTags: { + serializedName: "nodePublicIPTags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPTag" + } + } + } + }, + allowedHostPorts: { + serializedName: "allowedHostPorts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PortRange" + } + } + } + }, + applicationSecurityGroups: { + serializedName: "applicationSecurityGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IPTag: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPTag", + modelProperties: { + ipTagType: { + serializedName: "ipTagType", + type: { + name: "String" + } + }, + tag: { + serializedName: "tag", + type: { + name: "String" + } + } + } + } +}; + +export const PortRange: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PortRange", + modelProperties: { + portStart: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "portStart", + type: { + name: "Number" + } + }, + portEnd: { + constraints: { + InclusiveMaximum: 65535, + InclusiveMinimum: 1 + }, + serializedName: "portEnd", + type: { + name: "Number" + } + }, + protocol: { + serializedName: "protocol", + type: { + name: "String" + } + } + } + } +}; + export const ContainerServiceLinuxProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1750,6 +1863,13 @@ export const ManagedClusterLoadBalancerProfile: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + backendPoolType: { + defaultValue: "NodeIPConfiguration", + serializedName: "backendPoolType", + type: { + name: "String" + } } } } @@ -4097,6 +4217,264 @@ export const MeshUpgradeProfileList: coreClient.CompositeMapper = { } }; +export const TrustedAccessRoleBindingListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleBindingListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedAccessRoleBinding" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String" + } + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const TrustedAccessRoleListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedAccessRole" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TrustedAccessRole: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRole", + modelProperties: { + sourceResourceType: { + serializedName: "sourceResourceType", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + rules: { + serializedName: "rules", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrustedAccessRoleRule" + } + } + } + } + } + } +}; + +export const TrustedAccessRoleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleRule", + modelProperties: { + verbs: { + serializedName: "verbs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + apiGroups: { + serializedName: "apiGroups", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resources: { + serializedName: "resources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceNames: { + serializedName: "resourceNames", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nonResourceURLs: { + serializedName: "nonResourceURLs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const ManagedClusterAgentPoolProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4161,6 +4539,42 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; +export const TrustedAccessRoleBinding: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleBinding", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + sourceResourceId: { + serializedName: "properties.sourceResourceId", + required: true, + type: { + name: "String" + } + }, + roles: { + serializedName: "properties.roles", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const MaintenanceConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4483,11 +4897,24 @@ export const AgentPool: coreClient.CompositeMapper = { className: "CreationData" } }, + capacityReservationGroupID: { + serializedName: "properties.capacityReservationGroupID", + type: { + name: "String" + } + }, hostGroupID: { serializedName: "properties.hostGroupID", type: { name: "String" } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "AgentPoolNetworkProfile" + } } } } @@ -5134,3 +5561,18 @@ export const AgentPoolsUpgradeNodeImageVersionHeaders: coreClient.CompositeMappe } } }; + +export const TrustedAccessRoleBindingsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustedAccessRoleBindingsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index 172a28f14085..b2cbe9db2958 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -21,7 +21,8 @@ import { AgentPool as AgentPoolMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, PrivateLinkResource as PrivateLinkResourceMapper, - Snapshot as SnapshotMapper + Snapshot as SnapshotMapper, + TrustedAccessRoleBinding as TrustedAccessRoleBindingMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -51,7 +52,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-08-01", + defaultValue: "2023-11-01", isConstant: true, serializedName: "api-version", type: { @@ -63,13 +64,10 @@ export const apiVersion: OperationQueryParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { - constraints: { - MinLength: 1 - }, serializedName: "subscriptionId", required: true, type: { - name: "String" + name: "Uuid" } } }; @@ -277,17 +275,6 @@ export const parameters5: OperationParameter = { mapper: AgentPoolMapper }; -export const agentPoolName1: OperationURLParameter = { - parameterPath: "agentPoolName", - mapper: { - serializedName: "agentPoolName", - required: true, - type: { - name: "String" - } - } -}; - export const privateEndpointConnectionName: OperationURLParameter = { parameterPath: "privateEndpointConnectionName", mapper: { @@ -313,3 +300,24 @@ export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: SnapshotMapper }; + +export const trustedAccessRoleBindingName: OperationURLParameter = { + parameterPath: "trustedAccessRoleBindingName", + mapper: { + constraints: { + Pattern: new RegExp("^([A-Za-z0-9-])+$"), + MaxLength: 24, + MinLength: 1 + }, + serializedName: "trustedAccessRoleBindingName", + required: true, + type: { + name: "String" + } + } +}; + +export const trustedAccessRoleBinding: OperationParameter = { + parameterPath: "trustedAccessRoleBinding", + mapper: TrustedAccessRoleBindingMapper +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts index a2be6e4f909c..93a09ecc6cf9 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -723,7 +723,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.agentPoolName1 + Parameters.agentPoolName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -756,7 +756,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.resourceName, - Parameters.agentPoolName1 + Parameters.agentPoolName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/containerservice/arm-containerservice/src/operations/index.ts b/sdk/containerservice/arm-containerservice/src/operations/index.ts index 6d786ed8c56d..efffc02a7d44 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -14,3 +14,5 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; +export * from "./trustedAccessRoleBindings"; +export * from "./trustedAccessRoles"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index fd44c23e28d5..77b621d7d4a8 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -316,7 +316,7 @@ export class ManagedClustersImpl implements ManagedClusters { /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param options The options parameters. */ public listMeshRevisionProfiles( @@ -469,7 +469,7 @@ export class ManagedClustersImpl implements ManagedClusters { /** * Gets supported OS options in the specified subscription. - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param options The options parameters. */ getOSOptions( @@ -485,7 +485,7 @@ export class ManagedClustersImpl implements ManagedClusters { /** * Contains extra metadata on the version, including supported patch versions, capabilities, available * upgrades, and details on preview status of the version - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param options The options parameters. */ listKubernetesVersions( @@ -1700,7 +1700,7 @@ export class ManagedClustersImpl implements ManagedClusters { /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param options The options parameters. */ private _listMeshRevisionProfiles( @@ -1716,7 +1716,7 @@ export class ManagedClustersImpl implements ManagedClusters { /** * Contains extra metadata on the revision, including supported revisions, cluster compatibility and * available upgrades - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param mode The mode of the mesh. * @param options The options parameters. */ @@ -1823,7 +1823,7 @@ export class ManagedClustersImpl implements ManagedClusters { /** * ListMeshRevisionProfilesNext - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param nextLink The nextLink from the previous successful call to the ListMeshRevisionProfiles * method. * @param options The options parameters. diff --git a/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts new file mode 100644 index 000000000000..4ca27f58aebc --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoleBindings.ts @@ -0,0 +1,526 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { TrustedAccessRoleBindings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + TrustedAccessRoleBinding, + TrustedAccessRoleBindingsListNextOptionalParams, + TrustedAccessRoleBindingsListOptionalParams, + TrustedAccessRoleBindingsListResponse, + TrustedAccessRoleBindingsGetOptionalParams, + TrustedAccessRoleBindingsGetResponse, + TrustedAccessRoleBindingsCreateOrUpdateOptionalParams, + TrustedAccessRoleBindingsCreateOrUpdateResponse, + TrustedAccessRoleBindingsDeleteOptionalParams, + TrustedAccessRoleBindingsDeleteResponse, + TrustedAccessRoleBindingsListNextResponse +} from "../models"; + +/// +/** Class containing TrustedAccessRoleBindings operations. */ +export class TrustedAccessRoleBindingsImpl + implements TrustedAccessRoleBindings { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class TrustedAccessRoleBindings class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * List trusted access role bindings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, resourceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + resourceName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TrustedAccessRoleBindingsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, resourceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + resourceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + resourceName, + options + )) { + yield* page; + } + } + + /** + * List trusted access role bindings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, options }, + listOperationSpec + ); + } + + /** + * Get a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + options + }, + getOperationSpec + ); + } + + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TrustedAccessRoleBindingsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + trustedAccessRoleBinding, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + TrustedAccessRoleBindingsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + trustedAccessRoleBinding, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TrustedAccessRoleBindingsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller< + TrustedAccessRoleBindingsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + resourceName, + trustedAccessRoleBindingName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + resourceName: string, + nextLink: string, + options?: TrustedAccessRoleBindingsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, resourceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBindingListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + 201: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + 202: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + 204: { + bodyMapper: Mappers.TrustedAccessRoleBinding + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.trustedAccessRoleBinding, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.TrustedAccessRoleBindingsDeleteHeaders + }, + 201: { + headersMapper: Mappers.TrustedAccessRoleBindingsDeleteHeaders + }, + 202: { + headersMapper: Mappers.TrustedAccessRoleBindingsDeleteHeaders + }, + 204: { + headersMapper: Mappers.TrustedAccessRoleBindingsDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.trustedAccessRoleBindingName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleBindingListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts new file mode 100644 index 000000000000..e9c174c32a18 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/trustedAccessRoles.ts @@ -0,0 +1,170 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { TrustedAccessRoles } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClient } from "../containerServiceClient"; +import { + TrustedAccessRole, + TrustedAccessRolesListNextOptionalParams, + TrustedAccessRolesListOptionalParams, + TrustedAccessRolesListResponse, + TrustedAccessRolesListNextResponse +} from "../models"; + +/// +/** Class containing TrustedAccessRoles operations. */ +export class TrustedAccessRolesImpl implements TrustedAccessRoles { + private readonly client: ContainerServiceClient; + + /** + * Initialize a new instance of the class TrustedAccessRoles class. + * @param client Reference to the service client + */ + constructor(client: ContainerServiceClient) { + this.client = client; + } + + /** + * List supported trusted access roles. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + public list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(location, options, settings); + } + }; + } + + private async *listPagingPage( + location: string, + options?: TrustedAccessRolesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: TrustedAccessRolesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(location, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(location, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(location, options)) { + yield* page; + } + } + + /** + * List supported trusted access roles. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + private _list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param location The name of the Azure region. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + location: string, + nextLink: string, + options?: TrustedAccessRolesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.TrustedAccessRoleListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts index 6d786ed8c56d..efffc02a7d44 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts @@ -14,3 +14,5 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; +export * from "./trustedAccessRoleBindings"; +export * from "./trustedAccessRoles"; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts index 3422935154e2..532578092db8 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -100,7 +100,7 @@ export interface ManagedClusters { /** * Contains extra metadata on each revision, including supported revisions, cluster compatibility and * available upgrades - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param options The options parameters. */ listMeshRevisionProfiles( @@ -120,7 +120,7 @@ export interface ManagedClusters { ): PagedAsyncIterableIterator; /** * Gets supported OS options in the specified subscription. - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param options The options parameters. */ getOSOptions( @@ -130,7 +130,7 @@ export interface ManagedClusters { /** * Contains extra metadata on the version, including supported patch versions, capabilities, available * upgrades, and details on preview status of the version - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param options The options parameters. */ listKubernetesVersions( @@ -554,7 +554,7 @@ export interface ManagedClusters { /** * Contains extra metadata on the revision, including supported revisions, cluster compatibility and * available upgrades - * @param location The name of Azure region. + * @param location The name of the Azure region. * @param mode The mode of the mesh. * @param options The options parameters. */ diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts new file mode 100644 index 000000000000..7144598f35f8 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoleBindings.ts @@ -0,0 +1,115 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + TrustedAccessRoleBinding, + TrustedAccessRoleBindingsListOptionalParams, + TrustedAccessRoleBindingsGetOptionalParams, + TrustedAccessRoleBindingsGetResponse, + TrustedAccessRoleBindingsCreateOrUpdateOptionalParams, + TrustedAccessRoleBindingsCreateOrUpdateResponse, + TrustedAccessRoleBindingsDeleteOptionalParams, + TrustedAccessRoleBindingsDeleteResponse +} from "../models"; + +/// +/** Interface representing a TrustedAccessRoleBindings. */ +export interface TrustedAccessRoleBindings { + /** + * List trusted access role bindings. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + resourceName: string, + options?: TrustedAccessRoleBindingsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsGetOptionalParams + ): Promise; + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TrustedAccessRoleBindingsCreateOrUpdateResponse + > + >; + /** + * Create or update a trusted access role binding + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param trustedAccessRoleBinding A trusted access role binding + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + trustedAccessRoleBinding: TrustedAccessRoleBinding, + options?: TrustedAccessRoleBindingsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + TrustedAccessRoleBindingsDeleteResponse + > + >; + /** + * Delete a trusted access role binding. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param trustedAccessRoleBindingName The name of trusted access role binding. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + resourceName: string, + trustedAccessRoleBindingName: string, + options?: TrustedAccessRoleBindingsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts new file mode 100644 index 000000000000..6186e604d8c9 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/trustedAccessRoles.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + TrustedAccessRole, + TrustedAccessRolesListOptionalParams +} from "../models"; + +/// +/** Interface representing a TrustedAccessRoles. */ +export interface TrustedAccessRoles { + /** + * List supported trusted access roles. + * @param location The name of the Azure region. + * @param options The options parameters. + */ + list( + location: string, + options?: TrustedAccessRolesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/containerservice/arm-containerservice/test/sampleTest.ts b/sdk/containerservice/arm-containerservice/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/containerservice/arm-containerservice/tsconfig.json b/sdk/containerservice/arm-containerservice/tsconfig.json index 5bad5556bbfd..3e6ae96443f3 100644 --- a/sdk/containerservice/arm-containerservice/tsconfig.json +++ b/sdk/containerservice/arm-containerservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"