Skip to content

update_project async

update_project(
    environment_arn: EnvironmentArn,
    project: ProjectName,
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
    resource_filters: Optional[ResourceFiltersList] = None,
) -> UpdateProjectOutput

Updates an existing project. Omit any field to leave it unchanged.

Parameters:

Raises:

Examples:

Update a project Broadens the payments-prod project's scope to also include the account's S3 buckets during the PCI-DSS assessment.

>>> await client.update_project(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod', resource_filters=['tag:app=payments-prod', 'region:us-east-1 resourcetype:rds:db', 'region:us-east-1 resourcetype:s3:bucket'])
Source code in docs_src/capo_assurance/_services/async_assurance.py
async def update_project(
    self,
    environment_arn: "capo_assurance.types.environment_arn.EnvironmentArn",
    project: "capo_assurance.types.project_name.ProjectName",
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
    resource_filters: Optional[
        "capo_assurance.types.resource_filters_list.ResourceFiltersList"
    ] = None,
) -> "capo_assurance.types.update_project_output.UpdateProjectOutput":
    """<p>Updates an existing project. Omit any field to leave it unchanged.</p>

    Args:
        environment_arn: <p>The ARN of this governance environment.</p>
        project: <p>The name of the project.</p>
        resource_filters: <p>The filters that determine which resources are in scope.</p>

    Raises:
        capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
        capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
        capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
        capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
        capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Update a project
        Broadens the payments-prod project's scope to also include the account's S3 buckets during the PCI-DSS assessment.

        >>> await client.update_project(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod', resource_filters=['tag:app=payments-prod', 'region:us-east-1 resourcetype:rds:db', 'region:us-east-1 resourcetype:s3:bucket'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_assurance.types.update_project_input.UpdateProjectInput]",
    ) -> AsyncOperationResponse[
        "capo_assurance.types.update_project_output.UpdateProjectOutput"
    ]:
        import capo_assurance._operations.assurance.update_project

        (
            output,
            http_response,
        ) = await capo_assurance._operations.assurance.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_assurance.types.update_project_input.UpdateProjectInput = {
        "environment_arn": environment_arn,
        "project": project,
    }
    if resource_filters is not None:
        input_["resource_filters"] = resource_filters

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