Skip to content

create_agent_organizational_profile

create_agent_organizational_profile(
    name: str,
    pillars: Pillars,
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    display_name: Optional[SensitiveString] = None,
    description: Optional[SensitiveString] = None,
    business_overview: Optional[SensitiveString] = None,
    deletion_protection: Optional[bool] = None,
    client_token: Optional[str] = None,
    organizational_aggregation_configuration: Optional[
        OrganizationalAggregationConfiguration
    ] = None,
    tags: Optional[Tags] = None,
) -> CreateAgentOrganizationalProfileResponse

Creates an Organizational Profile for use with AWS Organizations integration. Organizational Profiles are scoped to an AWS Organization and do not require an execution role or aggregation configuration. The organization is inferred from the caller's identity.

Parameters:

  • name (str) –

    The system name of the organizational profile.

  • display_name (Optional[SensitiveString], default: None ) –

    The display name of the organizational profile shown to users.

  • description (Optional[SensitiveString], default: None ) –

    A description of the organizational profile.

  • business_overview (Optional[SensitiveString], default: None ) –

    The business overview for this organizational profile.

  • pillars (Pillars) –

    The Amazon Web Services Well-Architected Framework pillars to associate with this organizational profile.

  • deletion_protection (Optional[bool], default: None ) –

    Indicates whether deletion protection is enabled for the organizational profile.

  • client_token (Optional[str], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

  • organizational_aggregation_configuration (Optional[OrganizationalAggregationConfiguration], default: None ) –

    The organizational monitoring boundary. Contains organizational unit or root entries and individual account entries that define the scope for the profile.

  • tags (Optional[Tags], default: None ) –

    The tags to associate with the organizational profile.

Raises:

Source code in docs_src/capo_wellarchitected/_services/well_architected.py
def create_agent_organizational_profile(
    self,
    name: str,
    pillars: "capo_wellarchitected.types.pillars.Pillars",
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    display_name: Optional[
        "capo_wellarchitected.types.sensitive_string.SensitiveString"
    ] = None,
    description: Optional[
        "capo_wellarchitected.types.sensitive_string.SensitiveString"
    ] = None,
    business_overview: Optional[
        "capo_wellarchitected.types.sensitive_string.SensitiveString"
    ] = None,
    deletion_protection: Optional[bool] = None,
    client_token: Optional[str] = None,
    organizational_aggregation_configuration: Optional[
        "capo_wellarchitected.types.organizational_aggregation_configuration.OrganizationalAggregationConfiguration"
    ] = None,
    tags: Optional["capo_wellarchitected.types.tags.Tags"] = None,
) -> "capo_wellarchitected.types.create_agent_organizational_profile_response.CreateAgentOrganizationalProfileResponse":
    """<p>Creates an Organizational Profile for use with AWS Organizations integration. Organizational Profiles are scoped to an AWS Organization and do not require an execution role or aggregation configuration. The organization is inferred from the caller's identity.</p>

    Args:
        name: <p>The system name of the organizational profile.</p>
        display_name: <p>The display name of the organizational profile shown to users.</p>
        description: <p>A description of the organizational profile.</p>
        business_overview: <p>The business overview for this organizational profile.</p>
        pillars: <p>The Amazon Web Services Well-Architected Framework pillars to associate with this organizational profile.</p>
        deletion_protection: <p>Indicates whether deletion protection is enabled for the organizational profile.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        organizational_aggregation_configuration: <p>The organizational monitoring boundary. Contains organizational unit or root entries and individual account entries that define the scope for the profile.</p>
        tags: <p>The tags to associate with the organizational profile.</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.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</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_organizational_profile_request.CreateAgentOrganizationalProfileRequest]",
    ) -> OperationResponse[
        "capo_wellarchitected.types.create_agent_organizational_profile_response.CreateAgentOrganizationalProfileResponse"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.create_agent_organizational_profile

        output, http_response = (
            capo_wellarchitected._operations.well_architected_api_service_lambda.create_agent_organizational_profile.create_agent_organizational_profile(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_wellarchitected.types.create_agent_organizational_profile_request.CreateAgentOrganizationalProfileRequest",
    ) -> dict[str, Any]:
        import capo_wellarchitected.types.create_agent_organizational_profile_request

        return capo_wellarchitected.types.create_agent_organizational_profile_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_wellarchitected.types.create_agent_organizational_profile_response.CreateAgentOrganizationalProfileResponse",
    ) -> dict[str, Any]:
        import capo_wellarchitected.types.create_agent_organizational_profile_response

        return capo_wellarchitected.types.create_agent_organizational_profile_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateAgentOrganizationalProfile",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_wellarchitected.types.create_agent_organizational_profile_request.CreateAgentOrganizationalProfileRequest = {
        "name": name,
        "pillars": pillars,
    }
    if display_name is not None:
        input_["display_name"] = display_name
    if description is not None:
        input_["description"] = description
    if business_overview is not None:
        input_["business_overview"] = business_overview
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if organizational_aggregation_configuration is not None:
        input_["organizational_aggregation_configuration"] = (
            organizational_aggregation_configuration
        )
    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