add_client_id_to_open_id_connect_provider(
open_id_connect_provider_arn: arnType,
client_id: clientIDType,
*,
config_overrides: Optional[IAMClientConfig] = None,
) -> None
Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM OpenID Connect (OIDC) provider resource.
This operation is idempotent; it does not fail or return an error if you add an existing client ID to the provider.
Parameters:
-
open_id_connect_provider_arn
(arnType)
–
The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider resource to add the client ID to. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders operation.
-
client_id
(clientIDType)
–
The client ID (also known as audience) to add to the IAM OpenID Connect provider resource.
Raises:
-
ConcurrentModificationException
–
The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.
-
InvalidInputException
–
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
-
LimitExceededException
–
The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.
-
NoSuchEntityException
–
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException
–
The request processing has failed because of an unknown error, exception or failure.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To add a client ID (audience) to an Open-ID Connect (OIDC) provider
The following add-client-id-to-open-id-connect-provider command adds the client ID my-application-ID to the OIDC provider named server.example.com:
>>> client.add_client_id_to_open_id_connect_provider(client_id='my-application-ID', open_id_connect_provider_arn='arn:aws:iam::123456789012:oidc-provider/server.example.com')
Source code in docs_src/capo_iam/_services/iam.py
| def add_client_id_to_open_id_connect_provider(
self,
open_id_connect_provider_arn: "capo_iam.types.arn_type.arnType",
client_id: "capo_iam.types.client_id_type.clientIDType",
*,
config_overrides: Optional[IAMClientConfig] = None,
) -> None:
"""<p>Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM OpenID Connect (OIDC) provider resource.</p> <p>This operation is idempotent; it does not fail or return an error if you add an existing client ID to the provider.</p>
Args:
open_id_connect_provider_arn: <p>The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider resource to add the client ID to. You can get a list of OIDC provider ARNs by using the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListOpenIDConnectProviders.html">ListOpenIDConnectProviders</a> operation.</p>
client_id: <p>The client ID (also known as audience) to add to the IAM OpenID Connect provider resource.</p>
Raises:
capo_iam.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.</p>
capo_iam.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_iam.errors.limit_exceeded_exception.LimitExceededException: <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.</p>
capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To add a client ID (audience) to an Open-ID Connect (OIDC) provider
The following add-client-id-to-open-id-connect-provider command adds the client ID my-application-ID to the OIDC provider named server.example.com:
>>> client.add_client_id_to_open_id_connect_provider(client_id='my-application-ID', open_id_connect_provider_arn='arn:aws:iam::123456789012:oidc-provider/server.example.com')
"""
def _handler(
req: "OperationRequest[capo_iam.types.add_client_id_to_open_id_connect_provider_request.AddClientIDToOpenIDConnectProviderRequest]",
) -> OperationResponse[None]:
import capo_iam._operations.aws_identity_management_v20100508.add_client_id_to_open_id_connect_provider
output, http_response = (
capo_iam._operations.aws_identity_management_v20100508.add_client_id_to_open_id_connect_provider.add_client_id_to_open_id_connect_provider(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AddClientIDToOpenIDConnectProvider")
)
input_: capo_iam.types.add_client_id_to_open_id_connect_provider_request.AddClientIDToOpenIDConnectProviderRequest = {
"open_id_connect_provider_arn": open_id_connect_provider_arn,
"client_id": client_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|