Put an entry in the attribute mapping rules that will be enforced by a given profile. A mapping specifies a certificate field and one or more specifiers that have contextual meanings.
Parameters:
-
profile_id
(Uuid)
–
The unique identifier of the profile.
-
certificate_field
(CertificateField)
–
Fields (x509Subject, x509Issuer and x509SAN) within X.509 certificates.
-
mapping_rules
(MappingRules)
–
A list of mapping entries for every supported specifier or sub-field.
Raises:
Examples:
PutAttributeMapping - Adds a custom attribute mapping rule
>>> await client.put_attribute_mapping(profile_id='00000000-0000-0000-0000-000000000000', mapping_rules=[{'specifier': 'CN'}], certificate_field='x509Subject')
Source code in docs_src/capo_rolesanywhere/_services/async_roles_anywhere.py
| async def put_attribute_mapping(
self,
profile_id: "capo_rolesanywhere.types.uuid.Uuid",
certificate_field: "capo_rolesanywhere.types.certificate_field.CertificateField",
mapping_rules: "capo_rolesanywhere.types.mapping_rules.MappingRules",
*,
config_overrides: Optional[AsyncRolesAnywhereClientConfig] = None,
) -> "capo_rolesanywhere.types.put_attribute_mapping_response.PutAttributeMappingResponse":
"""<p>Put an entry in the attribute mapping rules that will be enforced by a given profile. A mapping specifies a certificate field and one or more specifiers that have contextual meanings.</p>
Args:
profile_id: <p>The unique identifier of the profile.</p>
certificate_field: <p>Fields (x509Subject, x509Issuer and x509SAN) within X.509 certificates.</p>
mapping_rules: <p>A list of mapping entries for every supported specifier or sub-field.</p>
Raises:
capo_rolesanywhere.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_rolesanywhere.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
capo_rolesanywhere.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
PutAttributeMapping - Adds a custom attribute mapping rule
>>> await client.put_attribute_mapping(profile_id='00000000-0000-0000-0000-000000000000', mapping_rules=[{'specifier': 'CN'}], certificate_field='x509Subject')
"""
async def _handler(
req: "AsyncOperationRequest[capo_rolesanywhere.types.put_attribute_mapping_request.PutAttributeMappingRequest]",
) -> AsyncOperationResponse[
"capo_rolesanywhere.types.put_attribute_mapping_response.PutAttributeMappingResponse"
]:
import capo_rolesanywhere._operations.roles_anywhere.put_attribute_mapping
(
output,
http_response,
) = await capo_rolesanywhere._operations.roles_anywhere.put_attribute_mapping.async_put_attribute_mapping(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutAttributeMapping")
)
input_: capo_rolesanywhere.types.put_attribute_mapping_request.PutAttributeMappingRequest = {
"profile_id": profile_id,
"certificate_field": certificate_field,
"mapping_rules": mapping_rules,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|