Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR containerservices/resource-manager] [AKS]: SP/AAD update operation for 2018-03-31 and 2018-08-01-preview #855

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions packages/@azure/arm-containerservice/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,44 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster & {
};
};

/**
* Contains response data for the resetServicePrincipalProfile operation.
*/
export type ManagedClustersResetServicePrincipalProfileResponse = ManagedCluster & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ManagedCluster;
};
};

/**
* Contains response data for the resetAADProfile operation.
*/
export type ManagedClustersResetAADProfileResponse = ManagedCluster & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ManagedCluster;
};
};

/**
* Contains response data for the beginCreateOrUpdate operation.
*/
Expand Down Expand Up @@ -2128,6 +2166,44 @@ export type ManagedClustersBeginUpdateTagsResponse = ManagedCluster & {
};
};

/**
* Contains response data for the beginResetServicePrincipalProfile operation.
*/
export type ManagedClustersBeginResetServicePrincipalProfileResponse = ManagedCluster & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ManagedCluster;
};
};

/**
* Contains response data for the beginResetAADProfile operation.
*/
export type ManagedClustersBeginResetAADProfileResponse = ManagedCluster & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;
/**
* The response body as parsed JSON or XML
*/
parsedBody: ManagedCluster;
};
};

/**
* Contains response data for the listNext operation.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@ export class ContainerServices {
* agents, and FQDNs of masters and agents.
* @summary Gets a list of container services in the specified subscription.
* @param [options] The optional parameters
* @deprecated This operation is deprecated. Please do not use it any longer.
* @returns Promise<Models.ContainerServicesListResponse>
*/
list(options?: msRest.RequestOptionsBase): Promise<Models.ContainerServicesListResponse>;
/**
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
list(callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
/**
* @param options The optional parameters
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerServiceListResult>, callback?: msRest.ServiceCallback<Models.ContainerServiceListResult>): Promise<Models.ContainerServicesListResponse> {
Expand Down Expand Up @@ -79,6 +82,7 @@ export class ContainerServices {
* @param containerServiceName The name of the container service in the specified subscription and
* resource group.
* @param [options] The optional parameters
* @deprecated This operation is deprecated. Please do not use it any longer.
* @returns Promise<Models.ContainerServicesGetResponse>
*/
get(resourceGroupName: string, containerServiceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerServicesGetResponse>;
Expand All @@ -87,6 +91,7 @@ export class ContainerServices {
* @param containerServiceName The name of the container service in the specified subscription and
* resource group.
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
get(resourceGroupName: string, containerServiceName: string, callback: msRest.ServiceCallback<Models.ContainerService>): void;
/**
Expand All @@ -95,6 +100,7 @@ export class ContainerServices {
* resource group.
* @param options The optional parameters
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
get(resourceGroupName: string, containerServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerService>): void;
get(resourceGroupName: string, containerServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerService>, callback?: msRest.ServiceCallback<Models.ContainerService>): Promise<Models.ContainerServicesGetResponse> {
Expand Down Expand Up @@ -132,18 +138,21 @@ export class ContainerServices {
* @summary Gets a list of container services in the specified resource group.
* @param resourceGroupName The name of the resource group.
* @param [options] The optional parameters
* @deprecated This operation is deprecated. Please do not use it any longer.
* @returns Promise<Models.ContainerServicesListByResourceGroupResponse>
*/
listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerServicesListByResourceGroupResponse>;
/**
* @param resourceGroupName The name of the resource group.
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
/**
* @param resourceGroupName The name of the resource group.
* @param options The optional parameters
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerServiceListResult>, callback?: msRest.ServiceCallback<Models.ContainerServiceListResult>): Promise<Models.ContainerServicesListByResourceGroupResponse> {
Expand Down Expand Up @@ -239,18 +248,21 @@ export class ContainerServices {
* @summary Gets a list of container services in the specified subscription.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @deprecated This operation is deprecated. Please do not use it any longer.
* @returns Promise<Models.ContainerServicesListNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerServicesListNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerServiceListResult>, callback?: msRest.ServiceCallback<Models.ContainerServiceListResult>): Promise<Models.ContainerServicesListNextResponse> {
Expand All @@ -270,18 +282,21 @@ export class ContainerServices {
* @summary Gets a list of container services in the specified resource group.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @deprecated This operation is deprecated. Please do not use it any longer.
* @returns Promise<Models.ContainerServicesListByResourceGroupNextResponse>
*/
listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ContainerServicesListByResourceGroupNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
* @deprecated This operation is deprecated. Please do not use it any longer.
*/
listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ContainerServiceListResult>): void;
listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ContainerServiceListResult>, callback?: msRest.ServiceCallback<Models.ContainerServiceListResult>): Promise<Models.ContainerServicesListByResourceGroupNextResponse> {
Expand Down
142 changes: 142 additions & 0 deletions packages/@azure/arm-containerservice/lib/operations/managedClusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,35 @@ export class ManagedClusters {
.then(lroPoller => lroPoller.pollUntilFinished());
}

/**
* Update the service principal Profile for a managed cluster.
* @summary Reset Service Principal Profile of a managed cluster.
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param parameters Parameters supplied to the Reset Service Principal Profile operation for a
* Managed Cluster.
* @param [options] The optional parameters
* @returns Promise<Models.ManagedClustersResetServicePrincipalProfileResponse>
*/
resetServicePrincipalProfile(resourceGroupName: string, resourceName: string, parameters: Models.ManagedClusterServicePrincipalProfile, options?: msRest.RequestOptionsBase): Promise<Models.ManagedClustersResetServicePrincipalProfileResponse> {
return this.beginResetServicePrincipalProfile(resourceGroupName,resourceName,parameters,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ManagedClustersResetServicePrincipalProfileResponse>;
}

/**
* Update the AAD Profile for a managed cluster.
* @summary Reset AAD Profile of a managed cluster.
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param parameters Parameters supplied to the Reset AAD Profile operation for a Managed Cluster.
* @param [options] The optional parameters
* @returns Promise<Models.ManagedClustersResetAADProfileResponse>
*/
resetAADProfile(resourceGroupName: string, resourceName: string, parameters: Models.ManagedClusterAADProfile, options?: msRest.RequestOptionsBase): Promise<Models.ManagedClustersResetAADProfileResponse> {
return this.beginResetAADProfile(resourceGroupName,resourceName,parameters,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ManagedClustersResetAADProfileResponse>;
}

/**
* Creates or updates a managed cluster with the specified configuration for agents and Kubernetes
* version.
Expand Down Expand Up @@ -358,6 +387,49 @@ export class ManagedClusters {
options);
}

/**
* Update the service principal Profile for a managed cluster.
* @summary Reset Service Principal Profile of a managed cluster.
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param parameters Parameters supplied to the Reset Service Principal Profile operation for a
* Managed Cluster.
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginResetServicePrincipalProfile(resourceGroupName: string, resourceName: string, parameters: Models.ManagedClusterServicePrincipalProfile, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
resourceGroupName,
resourceName,
parameters,
options
},
beginResetServicePrincipalProfileOperationSpec,
options);
}

/**
* Update the AAD Profile for a managed cluster.
* @summary Reset AAD Profile of a managed cluster.
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param parameters Parameters supplied to the Reset AAD Profile operation for a Managed Cluster.
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginResetAADProfile(resourceGroupName: string, resourceName: string, parameters: Models.ManagedClusterAADProfile, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
resourceGroupName,
resourceName,
parameters,
options
},
beginResetAADProfileOperationSpec,
options);
}

/**
* Gets a list of managed clusters in the specified subscription. The operation returns properties
* of each managed cluster.
Expand Down Expand Up @@ -685,6 +757,76 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
serializer
};

const beginResetServicePrincipalProfileOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.resourceName
],
queryParameters: [
Parameters.apiVersion3
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.ManagedClusterServicePrincipalProfile,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.ManagedCluster
},
202: {
bodyMapper: Mappers.ManagedCluster
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

const beginResetAADProfileOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.resourceName
],
queryParameters: [
Parameters.apiVersion3
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: {
...Mappers.ManagedClusterAADProfile,
required: true
}
},
responses: {
200: {
bodyMapper: Mappers.ManagedCluster
},
202: {
bodyMapper: Mappers.ManagedCluster
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

const listNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
Expand Down