Deletes permissions for the specified private image. After you delete permissions for an image, AWS accounts to which you previously granted these permissions can no longer use the 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 to delete image permissions.
Raises:
Source code in docs_src/capo_appstream/_services/async_app_stream.py
| async def delete_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,
) -> "capo_appstream.types.delete_image_permissions_result.DeleteImagePermissionsResult":
"""<p>Deletes permissions for the specified private image. After you delete permissions for an image, AWS accounts to which you previously granted these permissions can no longer use the 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 to delete image permissions.</p>
Raises:
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.delete_image_permissions_request.DeleteImagePermissionsRequest]",
) -> AsyncOperationResponse[
"capo_appstream.types.delete_image_permissions_result.DeleteImagePermissionsResult"
]:
import capo_appstream._operations.photon_admin_proxy_service.delete_image_permissions
(
output,
http_response,
) = await capo_appstream._operations.photon_admin_proxy_service.delete_image_permissions.async_delete_image_permissions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteImagePermissions")
)
input_: capo_appstream.types.delete_image_permissions_request.DeleteImagePermissionsRequest = {}
if name is not None:
input_["name"] = name
if shared_account_id is not None:
input_["shared_account_id"] = shared_account_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|