Creates a group. You may provide the initial version of the group or use ''CreateGroupVersion'' at a later time. Tip: You can use the ''gg_group_setup'' package (https://github.com/awslabs/aws-greengrass-group-setup) as a library or command-line application to create and deploy Greengrass groups.
Parameters:
-
amzn_client_token
(Optional[__string], default:
None
)
–
A client token used to correlate requests and responses.
-
initial_version
(Optional[GroupVersion], default:
None
)
–
Information about the initial version of the group.
-
name
(Optional[__string], default:
None
)
–
-
tags
(Optional[Tags], default:
None
)
–
Tag(s) to add to the new resource.
Raises:
Source code in docs_src/capo_greengrass/_services/async_greengrass.py
| async def create_group(
self,
*,
config_overrides: Optional[AsyncGreengrassClientConfig] = None,
amzn_client_token: Optional["capo_greengrass.types.__string.__string"] = None,
initial_version: Optional[
"capo_greengrass.types.group_version.GroupVersion"
] = None,
name: Optional["capo_greengrass.types.__string.__string"] = None,
tags: Optional["capo_greengrass.types.tags.Tags"] = None,
) -> "capo_greengrass.types.create_group_response.CreateGroupResponse":
"""Creates a group. You may provide the initial version of the group or use ''CreateGroupVersion'' at a later time. Tip: You can use the ''gg_group_setup'' package (https://github.com/awslabs/aws-greengrass-group-setup) as a library or command-line application to create and deploy Greengrass groups.
Args:
amzn_client_token: A client token used to correlate requests and responses.
initial_version: Information about the initial version of the group.
name: The name of the group.
tags: Tag(s) to add to the new resource.
Raises:
capo_greengrass.errors.bad_request_exception.BadRequestException: General error information.
capo_greengrass.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_greengrass.types.create_group_request.CreateGroupRequest]",
) -> AsyncOperationResponse[
"capo_greengrass.types.create_group_response.CreateGroupResponse"
]:
import capo_greengrass._operations.greengrass.create_group
(
output,
http_response,
) = await capo_greengrass._operations.greengrass.create_group.async_create_group(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateGroup")
)
input_: capo_greengrass.types.create_group_request.CreateGroupRequest = {}
if amzn_client_token is not None:
input_["amzn_client_token"] = amzn_client_token
if initial_version is not None:
input_["initial_version"] = initial_version
if name is not None:
input_["name"] = name
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|