Adds or updates permissions for the specified private image.
Parameters:
-
name
(Optional[Name], default:
None
)
–
The name of the private image.
-
shared_account_id
(Optional[AwsAccountId], default:
None
)
–
The 12-digit identifier of the AWS account for which you want add or update image permissions.
-
image_permissions
(Optional[ImagePermissions], default:
None
)
–
The permissions for the image.
Raises:
Source code in docs_src/capo_appstream/_services/async_app_stream.py
| async def update_image_permissions(
self,
*,
config_overrides: Optional[AsyncAppStreamClientConfig] = None,
name: Optional["capo_appstream.types.name.Name"] = None,
shared_account_id: Optional[
"capo_appstream.types.aws_account_id.AwsAccountId"
] = None,
image_permissions: Optional[
"capo_appstream.types.image_permissions.ImagePermissions"
] = None,
) -> "capo_appstream.types.update_image_permissions_result.UpdateImagePermissionsResult":
"""<p>Adds or updates permissions for the specified private image. </p>
Args:
name: <p>The name of the private image.</p>
shared_account_id: <p>The 12-digit identifier of the AWS account for which you want add or update image permissions.</p>
image_permissions: <p>The permissions for the image.</p>
Raises:
capo_appstream.errors.limit_exceeded_exception.LimitExceededException: <p>The requested limit exceeds the permitted limit for an account.</p>
capo_appstream.errors.resource_not_available_exception.ResourceNotAvailableException: <p>The specified resource exists and is not in use, but isn't available.</p>
capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appstream.types.update_image_permissions_request.UpdateImagePermissionsRequest]",
) -> AsyncOperationResponse[
"capo_appstream.types.update_image_permissions_result.UpdateImagePermissionsResult"
]:
import capo_appstream._operations.photon_admin_proxy_service.update_image_permissions
(
output,
http_response,
) = await capo_appstream._operations.photon_admin_proxy_service.update_image_permissions.async_update_image_permissions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateImagePermissions")
)
input_: capo_appstream.types.update_image_permissions_request.UpdateImagePermissionsRequest = {}
if name is not None:
input_["name"] = name
if shared_account_id is not None:
input_["shared_account_id"] = shared_account_id
if image_permissions is not None:
input_["image_permissions"] = image_permissions
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|