Creates a profile that can be applied to one or more private fleet device instances.
Parameters:
-
name
(Name)
–
The name of your instance profile.
-
description
(Optional[Message], default:
None
)
–
The description of your instance profile.
-
package_cleanup
(Optional[Boolean], default:
None
)
–
When set to true, Device Farm removes app packages after a test run. 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.
The list of packages is considered only if you set packageCleanup to true.
-
reboot_after_use
(Optional[Boolean], default:
None
)
–
When set to true, Device Farm reboots the instance after a test run. The default value is true.
Raises:
Source code in docs_src/capo_device_farm/_services/device_farm.py
| def create_instance_profile(
self,
name: "capo_device_farm.types.name.Name",
*,
config_overrides: Optional[DeviceFarmClientConfig] = 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.create_instance_profile_result.CreateInstanceProfileResult":
"""<p>Creates a profile that can be applied to one or more private fleet device instances.</p>
Args:
name: <p>The name of your instance profile.</p>
description: <p>The description of your instance profile.</p>
package_cleanup: <p>When set to <code>true</code>, Device Farm removes app packages after a test run. 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.</p> <p>The list of packages is considered only if you set <code>packageCleanup</code> to <code>true</code>.</p>
reboot_after_use: <p>When set to <code>true</code>, Device Farm reboots the instance after a test run. 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.
"""
def _handler(
req: "OperationRequest[capo_device_farm.types.create_instance_profile_request.CreateInstanceProfileRequest]",
) -> OperationResponse[
"capo_device_farm.types.create_instance_profile_result.CreateInstanceProfileResult"
]:
import capo_device_farm._operations.device_farm_20150623.create_instance_profile
output, http_response = (
capo_device_farm._operations.device_farm_20150623.create_instance_profile.create_instance_profile(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateInstanceProfile")
)
input_: capo_device_farm.types.create_instance_profile_request.CreateInstanceProfileRequest = {
"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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|