Skip to content

update_studio

update_studio(
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    studio_id: Optional[XmlStringMaxLen256] = None,
    name: Optional[XmlStringMaxLen256] = None,
    description: Optional[XmlStringMaxLen256] = None,
    subnet_ids: Optional[SubnetIdList] = None,
    default_s3_location: Optional[XmlString] = None,
    encryption_key_arn: Optional[XmlString] = None,
) -> None

Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.

Parameters:

  • studio_id (Optional[XmlStringMaxLen256], default: None ) –

    The ID of the Amazon EMR Studio to update.

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

    A descriptive name for the Amazon EMR Studio.

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

    A detailed description to assign to the Amazon EMR Studio.

  • subnet_ids (Optional[SubnetIdList], default: None ) –

    A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.

  • default_s3_location (Optional[XmlString], default: None ) –

    The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.

  • encryption_key_arn (Optional[XmlString], default: None ) –

    The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.

Raises:

Source code in docs_src/capo_emr/_services/emr.py
def update_studio(
    self,
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    studio_id: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    name: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    description: Optional[
        "capo_emr.types.xml_string_max_len256.XmlStringMaxLen256"
    ] = None,
    subnet_ids: Optional["capo_emr.types.subnet_id_list.SubnetIdList"] = None,
    default_s3_location: Optional["capo_emr.types.xml_string.XmlString"] = None,
    encryption_key_arn: Optional["capo_emr.types.xml_string.XmlString"] = None,
) -> None:
    """<p>Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.</p>

    Args:
        studio_id: <p>The ID of the Amazon EMR Studio to update.</p>
        name: <p>A descriptive name for the Amazon EMR Studio.</p>
        description: <p>A detailed description to assign to the Amazon EMR Studio.</p>
        subnet_ids: <p>A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio. </p>
        default_s3_location: <p>The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.</p>
        encryption_key_arn: <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>

    Raises:
        capo_emr.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Amazon EMR service.</p>
        capo_emr.errors.invalid_request_exception.InvalidRequestException: <p>This exception occurs when there is something wrong with user input.</p>
        capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_emr.types.update_studio_input.UpdateStudioInput]",
    ) -> OperationResponse[None]:
        import capo_emr._operations.elastic_map_reduce.update_studio

        output, http_response = (
            capo_emr._operations.elastic_map_reduce.update_studio.update_studio(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateStudio")
    )
    input_: capo_emr.types.update_studio_input.UpdateStudioInput = {}
    if studio_id is not None:
        input_["studio_id"] = studio_id
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if subnet_ids is not None:
        input_["subnet_ids"] = subnet_ids
    if default_s3_location is not None:
        input_["default_s3_location"] = default_s3_location
    if encryption_key_arn is not None:
        input_["encryption_key_arn"] = encryption_key_arn

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