Skip to content

update_agent_organizational_profile

update_agent_organizational_profile(
    profile_arn: AgentProfileArn,
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    client_token: Optional[str] = None,
    display_name: Optional[SensitiveString] = None,
    description: Optional[SensitiveString] = None,
    business_overview: Optional[SensitiveString] = None,
    pillars: Optional[Pillars] = None,
    deletion_protection: Optional[bool] = None,
    organizational_aggregation_configuration: Optional[
        OrganizationalAggregationConfiguration
    ] = None,
) -> UpdateAgentOrganizationalProfileResponse

Updates an Organizational Profile. Organizational Profiles are specific to Profiles created using AWS Organizations integration. Include only the fields you want to change; any field you omit from the request keeps its current value.

To clear an optional text field, supply an empty string for it; the field is then unset, and a subsequent read omits it rather than returning an empty string. Omitting the field from the request leaves the stored value in place. description and businessOverview can be cleared this way. displayName cannot be cleared because a display name is required, though you can change it. pillars cannot be cleared because a profile must target at least one pillar.

organizationalAggregationConfiguration behaves differently because it is a structure rather than a text field. Supplying it with both its organizationalUnits and accounts lists empty removes every monitored organizational unit and account, but the field itself remains set: a subsequent read returns the structure with two empty lists rather than omitting it. Omitting the field from the request keeps the stored boundary.

Parameters:

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

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

  • profile_arn (AgentProfileArn) –

    The Amazon Resource Name (ARN) of the organizational profile to update.

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

    The updated display name of the organizational profile. Omit this field to keep the current display name. A display name is required, so it cannot be cleared.

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

    The updated description of the organizational profile. Omit this field to keep the current description, or supply an empty string to clear it; a cleared description is read back as absent rather than as an empty string.

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

    The updated business overview for the organizational profile. Omit this field to keep the current business overview, or supply an empty string to clear it; a cleared business overview is read back as absent rather than as an empty string.

  • pillars (Optional[Pillars], default: None ) –

    The updated Amazon Web Services Well-Architected Framework pillars for the organizational profile. Omit this field to keep the current pillars. A profile must target at least one pillar, so an empty list is rejected.

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

    Indicates whether deletion protection is enabled for the organizational profile.

  • 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. Omit this field to keep the current boundary, or supply this structure with both its organizationalUnits and accounts lists empty to remove every monitored organizational unit and account. The field remains set either way — an emptied boundary is read back as a structure with two empty lists, not as an absent field.

Raises:

Source code in docs_src/capo_wellarchitected/_services/well_architected.py
def update_agent_organizational_profile(
    self,
    profile_arn: "capo_wellarchitected.types.agent_profile_arn.AgentProfileArn",
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    client_token: Optional[str] = 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,
    pillars: Optional["capo_wellarchitected.types.pillars.Pillars"] = None,
    deletion_protection: Optional[bool] = None,
    organizational_aggregation_configuration: Optional[
        "capo_wellarchitected.types.organizational_aggregation_configuration.OrganizationalAggregationConfiguration"
    ] = None,
) -> "capo_wellarchitected.types.update_agent_organizational_profile_response.UpdateAgentOrganizationalProfileResponse":
    """<p>Updates an Organizational Profile. Organizational Profiles are specific to Profiles created using AWS Organizations integration. Include only the fields you want to change; any field you omit from the request keeps its current value.</p> <p>To clear an optional text field, supply an empty string for it; the field is then unset, and a subsequent read omits it rather than returning an empty string. Omitting the field from the request leaves the stored value in place. <code>description</code> and <code>businessOverview</code> can be cleared this way. <code>displayName</code> cannot be cleared because a display name is required, though you can change it. <code>pillars</code> cannot be cleared because a profile must target at least one pillar.</p> <p> <code>organizationalAggregationConfiguration</code> behaves differently because it is a structure rather than a text field. Supplying it with both its <code>organizationalUnits</code> and <code>accounts</code> lists empty removes every monitored organizational unit and account, but the field itself remains set: a subsequent read returns the structure with two empty lists rather than omitting it. Omitting the field from the request keeps the stored boundary.</p>

    Args:
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        profile_arn: <p>The Amazon Resource Name (ARN) of the organizational profile to update.</p>
        display_name: <p>The updated display name of the organizational profile. Omit this field to keep the current display name. A display name is required, so it cannot be cleared.</p>
        description: <p>The updated description of the organizational profile. Omit this field to keep the current description, or supply an empty string to clear it; a cleared description is read back as absent rather than as an empty string.</p>
        business_overview: <p>The updated business overview for the organizational profile. Omit this field to keep the current business overview, or supply an empty string to clear it; a cleared business overview is read back as absent rather than as an empty string.</p>
        pillars: <p>The updated Amazon Web Services Well-Architected Framework pillars for the organizational profile. Omit this field to keep the current pillars. A profile must target at least one pillar, so an empty list is rejected.</p>
        deletion_protection: <p>Indicates whether deletion protection is enabled for the organizational profile.</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. Omit this field to keep the current boundary, or supply this structure with both its <code>organizationalUnits</code> and <code>accounts</code> lists empty to remove every monitored organizational unit and account. The field remains set either way — an emptied boundary is read back as a structure with two empty lists, not as an absent field.</p>

    Raises:
        capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</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.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.update_agent_organizational_profile_request.UpdateAgentOrganizationalProfileRequest]",
    ) -> OperationResponse[
        "capo_wellarchitected.types.update_agent_organizational_profile_response.UpdateAgentOrganizationalProfileResponse"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.update_agent_organizational_profile

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

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

        return capo_wellarchitected.types.update_agent_organizational_profile_request.redact_sensitive(
            input_
        )

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

        return capo_wellarchitected.types.update_agent_organizational_profile_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateAgentOrganizationalProfile",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_wellarchitected.types.update_agent_organizational_profile_request.UpdateAgentOrganizationalProfileRequest = {
        "profile_arn": profile_arn
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    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 pillars is not None:
        input_["pillars"] = pillars
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection
    if organizational_aggregation_configuration is not None:
        input_["organizational_aggregation_configuration"] = (
            organizational_aggregation_configuration
        )

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output