Skip to content

update_instance_profile async

update_instance_profile(
    arn: AmazonResourceName,
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    name: Optional[Name] = None,
    description: Optional[Message] = None,
    package_cleanup: Optional[Boolean] = None,
    exclude_app_packages_from_cleanup: Optional[PackageIds] = None,
    reboot_after_use: Optional[Boolean] = None,
) -> UpdateInstanceProfileResult

Updates information about an existing private device instance profile.

Parameters:

  • arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the instance profile.

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

    The updated name for your instance profile.

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

    The updated description for your instance profile.

  • package_cleanup (Optional[Boolean], default: None ) –

    The updated choice for whether you want to specify package cleanup. The default value is false for private devices.

  • exclude_app_packages_from_cleanup (Optional[PackageIds], default: None ) –

    An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run is over.

    The list of packages is only considered if you set packageCleanup to true.

  • reboot_after_use (Optional[Boolean], default: None ) –

    The updated choice for whether you want to reboot the device after use. The default value is true.

Raises:

Source code in docs_src/capo_device_farm/_services/async_device_farm.py
async def update_instance_profile(
    self,
    arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    name: Optional["capo_device_farm.types.name.Name"] = None,
    description: Optional["capo_device_farm.types.message.Message"] = None,
    package_cleanup: Optional["capo_device_farm.types.boolean.Boolean"] = None,
    exclude_app_packages_from_cleanup: Optional[
        "capo_device_farm.types.package_ids.PackageIds"
    ] = None,
    reboot_after_use: Optional["capo_device_farm.types.boolean.Boolean"] = None,
) -> "capo_device_farm.types.update_instance_profile_result.UpdateInstanceProfileResult":
    """<p>Updates information about an existing private device instance profile.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the instance profile.</p>
        name: <p>The updated name for your instance profile.</p>
        description: <p>The updated description for your instance profile.</p>
        package_cleanup: <p>The updated choice for whether you want to specify package cleanup. The default value is <code>false</code> for private devices.</p>
        exclude_app_packages_from_cleanup: <p>An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run is over.</p> <p>The list of packages is only considered if you set <code>packageCleanup</code> to <code>true</code>.</p>
        reboot_after_use: <p>The updated choice for whether you want to reboot the device after use. The default value is <code>true</code>.</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_instance_profile_request.UpdateInstanceProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_device_farm.types.update_instance_profile_result.UpdateInstanceProfileResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.update_instance_profile

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateInstanceProfile")
    )
    input_: capo_device_farm.types.update_instance_profile_request.UpdateInstanceProfileRequest = {
        "arn": arn
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if package_cleanup is not None:
        input_["package_cleanup"] = package_cleanup
    if exclude_app_packages_from_cleanup is not None:
        input_["exclude_app_packages_from_cleanup"] = (
            exclude_app_packages_from_cleanup
        )
    if reboot_after_use is not None:
        input_["reboot_after_use"] = reboot_after_use

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