Skip to content

update_dev_environment

update_dev_environment(
    space_name: NameString,
    project_name: NameString,
    id: Uuid,
    *,
    config_overrides: Optional[CodeCatalystClientConfig] = None,
    alias: Optional[str] = None,
    ides: Optional[IdeConfigurationList] = None,
    instance_type: Optional[InstanceType] = None,
    inactivity_timeout_minutes: Optional[InactivityTimeoutMinutes] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateDevEnvironmentResponse

Changes one or more values for a Dev Environment. Updating certain values of the Dev Environment will cause a restart.

Parameters:

  • space_name (NameString) –

    The name of the space.

  • project_name (NameString) –

    The name of the project in the space.

  • id (Uuid) –

    The system-generated unique ID of the Dev Environment.

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

    The user-specified alias for the Dev Environment. Changing this value will not cause a restart.

  • ides (Optional[IdeConfigurationList], default: None ) –

    Information about the integrated development environment (IDE) configured for a Dev Environment.

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

    The Amazon EC2 instace type to use for the Dev Environment.

    Changing this value will cause a restart of the Dev Environment if it is running.

  • inactivity_timeout_minutes (Optional[InactivityTimeoutMinutes], default: None ) –

    The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.

    Changing this value will cause a restart of the Dev Environment if it is running.

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

    A user-specified idempotency token. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.

Raises:

  • AccessDeniedException –

    The request was denied because you don't have sufficient access to perform this action. Verify that you are a member of a role that allows this action.

  • ConflictException –

    The request was denied because the requested operation would cause a conflict with the current state of a service resource associated with the request. Another user might have updated the resource. Reload, make sure you have the latest data, and then try again.

  • ResourceNotFoundException –

    The request was denied because the specified resource was not found. Verify that the spelling is correct and that you have access to the resource.

  • ServiceQuotaExceededException –

    The request was denied because one or more resources has reached its limits for the tier the space belongs to. Either reduce the number of resources, or change the tier if applicable.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request was denied because an input failed to satisfy the constraints specified by the service. Check the spelling and input requirements, and then try again.

  • UnknownServiceError –

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

Source code in docs_src/capo_codecatalyst/_services/code_catalyst.py
def update_dev_environment(
    self,
    space_name: "capo_codecatalyst.types.name_string.NameString",
    project_name: "capo_codecatalyst.types.name_string.NameString",
    id: "capo_codecatalyst.types.uuid.Uuid",
    *,
    config_overrides: Optional[CodeCatalystClientConfig] = None,
    alias: Optional[str] = None,
    ides: Optional[
        "capo_codecatalyst.types.ide_configuration_list.IdeConfigurationList"
    ] = None,
    instance_type: Optional[
        "capo_codecatalyst.types.instance_type.InstanceType"
    ] = None,
    inactivity_timeout_minutes: Optional[
        "capo_codecatalyst.types.inactivity_timeout_minutes.InactivityTimeoutMinutes"
    ] = None,
    client_token: Optional[
        "capo_codecatalyst.types.client_token.ClientToken"
    ] = None,
) -> "capo_codecatalyst.types.update_dev_environment_response.UpdateDevEnvironmentResponse":
    """<p>Changes one or more values for a Dev Environment. Updating certain values of the Dev Environment will cause a restart.</p>

    Args:
        space_name: <p>The name of the space.</p>
        project_name: <p>The name of the project in the space.</p>
        id: <p>The system-generated unique ID of the Dev Environment. </p>
        alias: <p>The user-specified alias for the Dev Environment. Changing this value will not cause a restart.</p>
        ides: <p>Information about the integrated development environment (IDE) configured for a Dev Environment.</p>
        instance_type: <p>The Amazon EC2 instace type to use for the Dev Environment. </p> <note> <p>Changing this value will cause a restart of the Dev Environment if it is running.</p> </note>
        inactivity_timeout_minutes: <p>The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.</p> <note> <p>Changing this value will cause a restart of the Dev Environment if it is running.</p> </note>
        client_token: <p>A user-specified idempotency token. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries return the result from the original successful request and have no additional effect.</p>

    Raises:
        capo_codecatalyst.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because you don't have sufficient access to perform this action. Verify that you are a member of a role that allows this action.</p>
        capo_codecatalyst.errors.conflict_exception.ConflictException: <p>The request was denied because the requested operation would cause a conflict with the current state of a service resource associated with the request. Another user might have updated the resource. Reload, make sure you have the latest data, and then try again.</p>
        capo_codecatalyst.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was denied because the specified resource was not found. Verify that the spelling is correct and that you have access to the resource.</p>
        capo_codecatalyst.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request was denied because one or more resources has reached its limits for the tier the space belongs to. Either reduce the number of resources, or change the tier if applicable.</p>
        capo_codecatalyst.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codecatalyst.errors.validation_exception.ValidationException: <p>The request was denied because an input failed to satisfy the constraints specified by the service. Check the spelling and input requirements, and then try again.</p>
        capo_codecatalyst.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codecatalyst.types.update_dev_environment_request.UpdateDevEnvironmentRequest]",
    ) -> OperationResponse[
        "capo_codecatalyst.types.update_dev_environment_response.UpdateDevEnvironmentResponse"
    ]:
        import capo_codecatalyst._operations.code_catalyst.update_dev_environment

        output, http_response = (
            capo_codecatalyst._operations.code_catalyst.update_dev_environment.update_dev_environment(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDevEnvironment")
    )
    input_: capo_codecatalyst.types.update_dev_environment_request.UpdateDevEnvironmentRequest = {
        "space_name": space_name,
        "project_name": project_name,
        "id": id,
    }
    if alias is not None:
        input_["alias"] = alias
    if ides is not None:
        input_["ides"] = ides
    if instance_type is not None:
        input_["instance_type"] = instance_type
    if inactivity_timeout_minutes is not None:
        input_["inactivity_timeout_minutes"] = inactivity_timeout_minutes
    if client_token is not None:
        input_["client_token"] = client_token

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