Retrieves a list that describes one or more specified image builders, if the image builder names are provided. Otherwise, all image builders in the account are described.
The description of each image builder includes its agent access configuration, if agent access is enabled.
Parameters:
-
names
(Optional[StringList], default:
None
)
–
The names of the image builders to describe.
-
max_results
(Optional[Integer], default:
None
)
–
The maximum size of each page of results.
-
next_token
(Optional[String], default:
None
)
–
The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.
Raises:
Source code in docs_src/capo_appstream/_services/app_stream.py
| def describe_image_builders(
self,
*,
config_overrides: Optional[AppStreamClientConfig] = None,
names: Optional["capo_appstream.types.string_list.StringList"] = None,
max_results: Optional["capo_appstream.types.integer.Integer"] = None,
next_token: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.describe_image_builders_result.DescribeImageBuildersResult":
"""<p>Retrieves a list that describes one or more specified image builders, if the image builder names are provided. Otherwise, all image builders in the account are described.</p> <p>The description of each image builder includes its agent access configuration, if agent access is enabled.</p>
Args:
names: <p>The names of the image builders to describe.</p>
max_results: <p>The maximum size of each page of results.</p>
next_token: <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
Raises:
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.
"""
def _handler(
req: "OperationRequest[capo_appstream.types.describe_image_builders_request.DescribeImageBuildersRequest]",
) -> OperationResponse[
"capo_appstream.types.describe_image_builders_result.DescribeImageBuildersResult"
]:
if req.options.protocol == "awsJson1_1":
import capo_appstream._operations.photon_admin_proxy_service.aws_json1_1.describe_image_builders
output, http_response = (
capo_appstream._operations.photon_admin_proxy_service.aws_json1_1.describe_image_builders.describe_image_builders(
req.options, req.input
)
)
elif req.options.protocol == "rpcv2Cbor":
import capo_appstream._operations.photon_admin_proxy_service.rpcv2_cbor.describe_image_builders
output, http_response = (
capo_appstream._operations.photon_admin_proxy_service.rpcv2_cbor.describe_image_builders.describe_image_builders(
req.options, req.input
)
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeImageBuilders")
)
input_: capo_appstream.types.describe_image_builders_request.DescribeImageBuildersRequest = {}
if names is not None:
input_["names"] = names
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|