Skip to content

update_domain_for_organization async

update_domain_for_organization(
    domain_id: DomainId,
    *,
    config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
    name: Optional[str] = None,
    identity_providers: Optional[IdentityProviderList] = None,
    identity_provider_configuration: Optional[IdentityProviderConfiguration] = None,
) -> UpdateDomainForOrganizationOutput

Updates an organization domain's name or identity provider configuration. Call this operation in the Region where the domain was created. Only the provided fields are changed; omitted fields are left unchanged. Renaming a domain also changes the endpoint URLs derived from its name.

Parameters:

  • domain_id (DomainId) –

    The ID of the organization domain to update.

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

    A new name for the organization domain. Omit to leave unchanged. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.

  • identity_providers (Optional[IdentityProviderList], default: None ) –

    The identity providers to configure for the domain. Omit to leave unchanged.

  • identity_provider_configuration (Optional[IdentityProviderConfiguration], default: None ) –

    Identity provider configuration for the domain. Omit to leave unchanged.

Raises:

Examples:

Rename an organization domain The following example performs a partial update that changes only the organization domain name; the omitted fields are left unchanged. The endpoint URLs derived from the name are updated, and updatedAt advances past createdAt. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> await client.update_domain_for_organization(domain_id='d-9z8y7x6w5v', name='prod-observability-org-metrics')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
async def update_domain_for_organization(
    self,
    domain_id: "capo_cloudwatchomni.types.domain_id.DomainId",
    *,
    config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
    name: Optional[str] = None,
    identity_providers: Optional[
        "capo_cloudwatchomni.types.identity_provider_list.IdentityProviderList"
    ] = None,
    identity_provider_configuration: Optional[
        "capo_cloudwatchomni.types.identity_provider_configuration.IdentityProviderConfiguration"
    ] = None,
) -> "capo_cloudwatchomni.types.update_domain_for_organization_output.UpdateDomainForOrganizationOutput":
    """Updates an organization domain's name or identity provider configuration. Call this operation in the Region where the domain was created. Only the provided fields are changed; omitted fields are left unchanged. Renaming a domain also changes the endpoint URLs derived from its name.

    Args:
        domain_id: The ID of the organization domain to update.
        name: A new name for the organization domain. Omit to leave unchanged. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
        identity_providers: The identity providers to configure for the domain. Omit to leave unchanged.
        identity_provider_configuration: Identity provider configuration for the domain. Omit to leave unchanged.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.conflict_exception.ConflictException: The operation could not be completed because of a conflict with the current state of the resource.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Rename an organization domain
        The following example performs a partial update that changes only the organization domain name; the omitted fields are left unchanged. The endpoint URLs derived from the name are updated, and updatedAt advances past createdAt. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> await client.update_domain_for_organization(domain_id='d-9z8y7x6w5v', name='prod-observability-org-metrics')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatchomni.types.update_domain_for_organization_input.UpdateDomainForOrganizationInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatchomni.types.update_domain_for_organization_output.UpdateDomainForOrganizationOutput"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.update_domain_for_organization

        (
            output,
            http_response,
        ) = await capo_cloudwatchomni._operations.cloud_watch_omni_frontend.update_domain_for_organization.async_update_domain_for_organization(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDomainForOrganization")
    )
    input_: capo_cloudwatchomni.types.update_domain_for_organization_input.UpdateDomainForOrganizationInput = {
        "domain_id": domain_id
    }
    if name is not None:
        input_["name"] = name
    if identity_providers is not None:
        input_["identity_providers"] = identity_providers
    if identity_provider_configuration is not None:
        input_["identity_provider_configuration"] = identity_provider_configuration

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output