Skip to content

update_app_block_builder async

update_app_block_builder(
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    name: Optional[Name] = None,
    description: Optional[Description] = None,
    display_name: Optional[DisplayName] = None,
    platform: Optional[PlatformType] = None,
    instance_type: Optional[String] = None,
    vpc_config: Optional[VpcConfig] = None,
    enable_default_internet_access: Optional[BooleanObject] = None,
    iam_role_arn: Optional[Arn] = None,
    access_endpoints: Optional[AccessEndpointList] = None,
    attributes_to_delete: Optional[AppBlockBuilderAttributes] = None,
    disable_imdsv1: Optional[BooleanObject] = None,
) -> UpdateAppBlockBuilderResult

Updates an app block builder.

If the app block builder is in the STARTING or STOPPING state, you can't update it. If the app block builder is in the RUNNING state, you can only update the DisplayName and Description. If the app block builder is in the STOPPED state, you can update any attribute except the Name.

Parameters:

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

    The unique name for the app block builder.

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

    The description of the app block builder.

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

    The display name of the app block builder.

  • platform (Optional[PlatformType], default: None ) –

    The platform of the app block builder.

    WINDOWS_SERVER_2019 is the only valid value.

  • instance_type (Optional[String], default: None ) –

    The instance type to use when launching the app block builder. The following instance types are available:

    • stream.standard.small

    • stream.standard.medium

    • stream.standard.large

    • stream.standard.xlarge

    • stream.standard.2xlarge

  • vpc_config (Optional[VpcConfig], default: None ) –

    The VPC configuration for the app block builder.

    App block builders require that you specify at least two subnets in different availability zones.

  • enable_default_internet_access (Optional[BooleanObject], default: None ) –

    Enables or disables default internet access for the app block builder.

  • iam_role_arn (Optional[Arn], default: None ) –

    The Amazon Resource Name (ARN) of the IAM role to apply to the app block builder. To assume a role, the app block builder calls the AWS Security Token Service (STS) AssumeRole API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. WorkSpaces Applications retrieves the temporary credentials and creates the appstream_machine_role credential profile on the instance.

    For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on WorkSpaces Applications Streaming Instances in the Amazon WorkSpaces Applications Administration Guide.

  • access_endpoints (Optional[AccessEndpointList], default: None ) –

    The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the app block builder only through the specified endpoints.

  • attributes_to_delete (Optional[AppBlockBuilderAttributes], default: None ) –

    The attributes to delete from the app block builder.

  • disable_imdsv1 (Optional[BooleanObject], default: None ) –

    Set to true to disable Instance Metadata Service Version 1 (IMDSv1) and enforce IMDSv2. Set to false to enable both IMDSv1 and IMDSv2.

Raises:

Source code in docs_src/capo_appstream/_services/async_app_stream.py
async def update_app_block_builder(
    self,
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    name: Optional["capo_appstream.types.name.Name"] = None,
    description: Optional["capo_appstream.types.description.Description"] = None,
    display_name: Optional["capo_appstream.types.display_name.DisplayName"] = None,
    platform: Optional["capo_appstream.types.platform_type.PlatformType"] = None,
    instance_type: Optional["capo_appstream.types.string.String"] = None,
    vpc_config: Optional["capo_appstream.types.vpc_config.VpcConfig"] = None,
    enable_default_internet_access: Optional[
        "capo_appstream.types.boolean_object.BooleanObject"
    ] = None,
    iam_role_arn: Optional["capo_appstream.types.arn.Arn"] = None,
    access_endpoints: Optional[
        "capo_appstream.types.access_endpoint_list.AccessEndpointList"
    ] = None,
    attributes_to_delete: Optional[
        "capo_appstream.types.app_block_builder_attributes.AppBlockBuilderAttributes"
    ] = None,
    disable_imdsv1: Optional[
        "capo_appstream.types.boolean_object.BooleanObject"
    ] = None,
) -> "capo_appstream.types.update_app_block_builder_result.UpdateAppBlockBuilderResult":
    """<p>Updates an app block builder.</p> <p>If the app block builder is in the <code>STARTING</code> or <code>STOPPING</code> state, you can't update it. If the app block builder is in the <code>RUNNING</code> state, you can only update the DisplayName and Description. If the app block builder is in the <code>STOPPED</code> state, you can update any attribute except the Name.</p>

    Args:
        name: <p>The unique name for the app block builder.</p>
        description: <p>The description of the app block builder.</p>
        display_name: <p>The display name of the app block builder.</p>
        platform: <p>The platform of the app block builder.</p> <p> <code>WINDOWS_SERVER_2019</code> is the only valid value.</p>
        instance_type: <p>The instance type to use when launching the app block builder. The following instance types are available:</p> <ul> <li> <p>stream.standard.small</p> </li> <li> <p>stream.standard.medium</p> </li> <li> <p>stream.standard.large</p> </li> <li> <p>stream.standard.xlarge</p> </li> <li> <p>stream.standard.2xlarge</p> </li> </ul>
        vpc_config: <p>The VPC configuration for the app block builder.</p> <p>App block builders require that you specify at least two subnets in different availability zones.</p>
        enable_default_internet_access: <p>Enables or disables default internet access for the app block builder.</p>
        iam_role_arn: <p>The Amazon Resource Name (ARN) of the IAM role to apply to the app block builder. To assume a role, the app block builder calls the AWS Security Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. WorkSpaces Applications retrieves the temporary credentials and creates the <b>appstream_machine_role</b> credential profile on the instance.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html">Using an IAM Role to Grant Permissions to Applications and Scripts Running on WorkSpaces Applications Streaming Instances</a> in the <i>Amazon WorkSpaces Applications Administration Guide</i>.</p>
        access_endpoints: <p>The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the app block builder only through the specified endpoints.</p>
        attributes_to_delete: <p>The attributes to delete from the app block builder.</p>
        disable_imdsv1: <p>Set to true to disable Instance Metadata Service Version 1 (IMDSv1) and enforce IMDSv2. Set to false to enable both IMDSv1 and IMDSv2.</p>

    Raises:
        capo_appstream.errors.concurrent_modification_exception.ConcurrentModificationException: <p>An API error occurred. Wait a few minutes and try again.</p>
        capo_appstream.errors.invalid_account_status_exception.InvalidAccountStatusException: <p>The resource cannot be created because your AWS account is suspended. For assistance, contact AWS Support. </p>
        capo_appstream.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Indicates an incorrect combination of parameters, or a missing parameter.</p>
        capo_appstream.errors.invalid_role_exception.InvalidRoleException: <p>The specified role is invalid.</p>
        capo_appstream.errors.limit_exceeded_exception.LimitExceededException: <p>The requested limit exceeds the permitted limit for an account.</p>
        capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.request_limit_exceeded_exception.RequestLimitExceededException: <p>WorkSpaces Applications can’t process the request right now because the Describe calls from your AWS account are being throttled by Amazon EC2. Try again later.</p>
        capo_appstream.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</p>
        capo_appstream.errors.resource_not_available_exception.ResourceNotAvailableException: <p>The specified resource exists and is not in use, but isn't available.</p>
        capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appstream.types.update_app_block_builder_request.UpdateAppBlockBuilderRequest]",
    ) -> AsyncOperationResponse[
        "capo_appstream.types.update_app_block_builder_result.UpdateAppBlockBuilderResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.update_app_block_builder

        (
            output,
            http_response,
        ) = await capo_appstream._operations.photon_admin_proxy_service.update_app_block_builder.async_update_app_block_builder(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAppBlockBuilder")
    )
    input_: capo_appstream.types.update_app_block_builder_request.UpdateAppBlockBuilderRequest = {}
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if display_name is not None:
        input_["display_name"] = display_name
    if platform is not None:
        input_["platform"] = platform
    if instance_type is not None:
        input_["instance_type"] = instance_type
    if vpc_config is not None:
        input_["vpc_config"] = vpc_config
    if enable_default_internet_access is not None:
        input_["enable_default_internet_access"] = enable_default_internet_access
    if iam_role_arn is not None:
        input_["iam_role_arn"] = iam_role_arn
    if access_endpoints is not None:
        input_["access_endpoints"] = access_endpoints
    if attributes_to_delete is not None:
        input_["attributes_to_delete"] = attributes_to_delete
    if disable_imdsv1 is not None:
        input_["disable_imdsv1"] = disable_imdsv1

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