Skip to content

update_profile_entry async

update_profile_entry(
    identifier: Identifier,
    profile_identifier: Identifier,
    *,
    config_overrides: Optional[AsyncCloudExtensionsClientConfig] = None,
    name: Optional[Name] = None,
    description: Optional[ClearableDescription_256] = None,
    interfaces: Optional[InterfaceOptionsMap] = None,
    execution_role: Optional[ClearableRoleArn] = None,
    version_policy: Optional[VersionPolicy] = None,
    settings: Optional[Settings] = None,
    approve: Optional[CapabilityPathList] = None,
) -> UpdateProfileEntryOutput

Updates a profile entry's configuration. Only provided fields are changed; omitted fields remain unchanged.

Parameters:

  • identifier (Identifier) –

    The identifier of the profile entry

  • profile_identifier (Identifier) –

    The identifier of the owning profile.

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

    A new name for the entry, unique within the profile.

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

    A new description of the entry's purpose. An empty string removes the description.

  • interfaces (Optional[InterfaceOptionsMap], default: None ) –

    Per-interface options, keyed by the id of an interface the extension declares.

  • execution_role (Optional[ClearableRoleArn], default: None ) –

    The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal. An empty string removes the entry's role, so the profile's default applies.

  • version_policy (Optional[VersionPolicy], default: None ) –

    Controls which extension version this entry tracks and how it adopts new releases.

  • settings (Optional[Settings], default: None ) –

    Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.

  • approve (Optional[CapabilityPathList], default: None ) –

    The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.

Raises:

  • AccessDeniedException –

    The caller does not have permission to perform the operation.

  • InternalServerException –

    The service couldn't process the request because of an internal error. Retry with capped exponential backoff and jitter.

  • ThrottlingException –

    The request rate exceeded a limit. Retry with capped exponential backoff and jitter.

  • ConflictException –

    The request conflicts with the current state of the resource.

  • ResourceNotFoundException –

    The specified resource does not exist or the caller does not have permission to access it.

  • ValidationException –

    The request was malformed or contained invalid parameter values.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_cloudextensions/_services/async_cloud_extensions.py
async def update_profile_entry(
    self,
    identifier: "capo_cloudextensions.types.identifier.Identifier",
    profile_identifier: "capo_cloudextensions.types.identifier.Identifier",
    *,
    config_overrides: Optional[AsyncCloudExtensionsClientConfig] = None,
    name: Optional["capo_cloudextensions.types.name.Name"] = None,
    description: Optional[
        "capo_cloudextensions.types.clearable_description_256.ClearableDescription_256"
    ] = None,
    interfaces: Optional[
        "capo_cloudextensions.types.interface_options_map.InterfaceOptionsMap"
    ] = None,
    execution_role: Optional[
        "capo_cloudextensions.types.clearable_role_arn.ClearableRoleArn"
    ] = None,
    version_policy: Optional[
        "capo_cloudextensions.types.version_policy.VersionPolicy"
    ] = None,
    settings: Optional["capo_cloudextensions.types.settings.Settings"] = None,
    approve: Optional[
        "capo_cloudextensions.types.capability_path_list.CapabilityPathList"
    ] = None,
) -> "capo_cloudextensions.types.update_profile_entry_output.UpdateProfileEntryOutput":
    """Updates a profile entry's configuration. Only provided fields are changed; omitted fields remain unchanged.

    Args:
        identifier: The identifier of the profile entry
        profile_identifier: The identifier of the owning profile.
        name: A new name for the entry, unique within the profile.
        description: A new description of the entry's purpose. An empty string removes the description.
        interfaces: Per-interface options, keyed by the id of an interface the extension declares.
        execution_role: The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal. An empty string removes the entry's role, so the profile's default applies.
        version_policy: Controls which extension version this entry tracks and how it adopts new releases.
        settings: Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
        approve: The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.

    Raises:
        capo_cloudextensions.errors.access_denied_exception.AccessDeniedException: The caller does not have permission to perform the operation.
        capo_cloudextensions.errors.internal_server_exception.InternalServerException: The service couldn't process the request because of an internal error. Retry with capped exponential backoff and jitter.
        capo_cloudextensions.errors.throttling_exception.ThrottlingException: The request rate exceeded a limit. Retry with capped exponential backoff and jitter.
        capo_cloudextensions.errors.conflict_exception.ConflictException: The request conflicts with the current state of the resource.
        capo_cloudextensions.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist or the caller does not have permission to access it.
        capo_cloudextensions.errors.validation_exception.ValidationException: The request was malformed or contained invalid parameter values.
        capo_cloudextensions.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudextensions.types.update_profile_entry_input.UpdateProfileEntryInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudextensions.types.update_profile_entry_output.UpdateProfileEntryOutput"
    ]:
        import capo_cloudextensions._operations.control_plane.update_profile_entry

        (
            output,
            http_response,
        ) = await capo_cloudextensions._operations.control_plane.update_profile_entry.async_update_profile_entry(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_cloudextensions.types.update_profile_entry_input.UpdateProfileEntryInput",
    ) -> dict[str, Any]:
        import capo_cloudextensions.types.update_profile_entry_input

        return (
            capo_cloudextensions.types.update_profile_entry_input.redact_sensitive(
                input_
            )
        )

    def _redact_output(
        output: "capo_cloudextensions.types.update_profile_entry_output.UpdateProfileEntryOutput",
    ) -> dict[str, Any]:
        import capo_cloudextensions.types.update_profile_entry_output

        return (
            capo_cloudextensions.types.update_profile_entry_output.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateProfileEntry",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_cloudextensions.types.update_profile_entry_input.UpdateProfileEntryInput = {
        "identifier": identifier,
        "profile_identifier": profile_identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if interfaces is not None:
        input_["interfaces"] = interfaces
    if execution_role is not None:
        input_["execution_role"] = execution_role
    if version_policy is not None:
        input_["version_policy"] = version_policy
    if settings is not None:
        input_["settings"] = settings
    if approve is not None:
        input_["approve"] = approve

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