Skip to content

update_project async

update_project(
    arn: AmazonResourceName,
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    name: Optional[Name] = None,
    default_job_timeout_minutes: Optional[JobTimeoutMinutes] = None,
    vpc_config: Optional[VpcConfig] = None,
    environment_variables: Optional[EnvironmentVariables] = None,
    execution_role_arn: Optional[AmazonRoleResourceName] = None,
) -> UpdateProjectResult

Modifies the specified project name, given the project ARN and a new name.

Parameters:

  • arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the project whose name to update.

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

    A string that represents the new name of the project that you are updating.

  • default_job_timeout_minutes (Optional[JobTimeoutMinutes], default: None ) –

    The number of minutes a test run in the project executes before it times out.

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

    The VPC security groups and subnets that are attached to a project.

  • environment_variables (Optional[EnvironmentVariables], default: None ) –

    A set of environment variables which are used by default for all runs in the project. These environment variables are applied to the test run during the execution of a test spec file.

    For more information about using test spec files, please see Custom test environments in AWS Device Farm.

  • execution_role_arn (Optional[AmazonRoleResourceName], default: None ) –

    An IAM role to be assumed by the test host for all runs in the project.

Raises:

Source code in docs_src/capo_device_farm/_services/async_device_farm.py
async def update_project(
    self,
    arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    name: Optional["capo_device_farm.types.name.Name"] = None,
    default_job_timeout_minutes: Optional[
        "capo_device_farm.types.job_timeout_minutes.JobTimeoutMinutes"
    ] = None,
    vpc_config: Optional["capo_device_farm.types.vpc_config.VpcConfig"] = None,
    environment_variables: Optional[
        "capo_device_farm.types.environment_variables.EnvironmentVariables"
    ] = None,
    execution_role_arn: Optional[
        "capo_device_farm.types.amazon_role_resource_name.AmazonRoleResourceName"
    ] = None,
) -> "capo_device_farm.types.update_project_result.UpdateProjectResult":
    """<p>Modifies the specified project name, given the project ARN and a new name.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
        name: <p>A string that represents the new name of the project that you are updating.</p>
        default_job_timeout_minutes: <p>The number of minutes a test run in the project executes before it times out.</p>
        vpc_config: <p>The VPC security groups and subnets that are attached to a project.</p>
        environment_variables: <p> A set of environment variables which are used by default for all runs in the project. These environment variables are applied to the test run during the execution of a test spec file. </p> <p> For more information about using test spec files, please see <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html">Custom test environments </a> in <i>AWS Device Farm.</i> </p>
        execution_role_arn: <p>An IAM role to be assumed by the test host for all runs in the project.</p>

    Raises:
        capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
        capo_device_farm.errors.limit_exceeded_exception.LimitExceededException: <p>A limit was exceeded.</p>
        capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
        capo_device_farm.errors.service_account_exception.ServiceAccountException: <p>There was a problem with the service account.</p>
        capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_device_farm.types.update_project_request.UpdateProjectRequest]",
    ) -> AsyncOperationResponse[
        "capo_device_farm.types.update_project_result.UpdateProjectResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.update_project

        (
            output,
            http_response,
        ) = await capo_device_farm._operations.device_farm_20150623.update_project.async_update_project(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProject")
    )
    input_: capo_device_farm.types.update_project_request.UpdateProjectRequest = {
        "arn": arn
    }
    if name is not None:
        input_["name"] = name
    if default_job_timeout_minutes is not None:
        input_["default_job_timeout_minutes"] = default_job_timeout_minutes
    if vpc_config is not None:
        input_["vpc_config"] = vpc_config
    if environment_variables is not None:
        input_["environment_variables"] = environment_variables
    if execution_role_arn is not None:
        input_["execution_role_arn"] = execution_role_arn

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