Creates a Basic profile for the calling account. No configuration input is required because the account and region are inferred from the caller. The profile uses the reserved name basic. This operation is idempotent. Calling it twice returns the same ARN. Each account can have at most one Basic profile.
Parameters:
-
tags
(Optional[Tags], default:
None
)
–
Tags to apply to the Basic profile at creation time.
Raises:
Source code in docs_src/capo_wellarchitected/_services/well_architected.py
| def create_agent_basic_profile(
self,
*,
config_overrides: Optional[WellArchitectedClientConfig] = None,
tags: Optional["capo_wellarchitected.types.tags.Tags"] = None,
) -> "capo_wellarchitected.types.create_agent_basic_profile_response.CreateAgentBasicProfileResponse":
"""<p>Creates a Basic profile for the calling account. No configuration input is required because the account and region are inferred from the caller. The profile uses the reserved name <code>basic</code>. This operation is idempotent. Calling it twice returns the same ARN. Each account can have at most one Basic profile.</p>
Args:
tags: <p>Tags to apply to the Basic profile at creation time.</p>
Raises:
capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_wellarchitected.errors.conflict_exception.ConflictException: <p>The resource has already been processed, was deleted, or is too large.</p>
capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
capo_wellarchitected.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The user has reached their resource quota.</p>
capo_wellarchitected.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_wellarchitected.errors.validation_exception.ValidationException: <p>The user input is not valid.</p>
capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_wellarchitected.types.create_agent_basic_profile_request.CreateAgentBasicProfileRequest]",
) -> OperationResponse[
"capo_wellarchitected.types.create_agent_basic_profile_response.CreateAgentBasicProfileResponse"
]:
import capo_wellarchitected._operations.well_architected_api_service_lambda.create_agent_basic_profile
output, http_response = (
capo_wellarchitected._operations.well_architected_api_service_lambda.create_agent_basic_profile.create_agent_basic_profile(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateAgentBasicProfile")
)
input_: capo_wellarchitected.types.create_agent_basic_profile_request.CreateAgentBasicProfileRequest = {}
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|