Skip to content

ResourceGroupsClient

Index > ResourceGroups > ResourceGroupsClient

Auto-generated documentation for ResourceGroups type annotations stubs module mypy-boto3-resource-groups.

ResourceGroupsClient

Type annotations and code completion for boto3.client("resource-groups"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_boto3_resource_groups.client import ResourceGroupsClient

def get_resource-groups_client() -> ResourceGroupsClient:
    return Session().client("resource-groups")

Exceptions

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("resource-groups").exceptions structure.

Usage example
client = boto3.client("resource-groups")

try:
    do_something(client)
except (
    client.BadRequestException,
    client.ClientError,
    client.ForbiddenException,
    client.InternalServerErrorException,
    client.MethodNotAllowedException,
    client.NotFoundException,
    client.TooManyRequestsException,
    client.UnauthorizedException,
) as e:
    print(e)
Type checking example
from mypy_boto3_resource_groups.client import Exceptions

def handle_error(exc: Exceptions.BadRequestException) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("resource-groups").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("resource-groups").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

create_group

Creates a resource group with the specified name and description.

Type annotations and code completion for boto3.client("resource-groups").create_group method. boto3 documentation

Method definition
def create_group(
    self,
    *,
    Name: str,
    Description: str = ...,
    ResourceQuery: ResourceQueryTypeDef = ...,  # (1)
    Tags: Mapping[str, str] = ...,
    Configuration: Sequence[GroupConfigurationItemTypeDef] = ...,  # (2)
) -> CreateGroupOutputTypeDef:  # (3)
    ...
  1. See ResourceQueryTypeDef
  2. See GroupConfigurationItemTypeDef
  3. See CreateGroupOutputTypeDef
Usage example with kwargs
kwargs: CreateGroupInputRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.create_group(**kwargs)
  1. See CreateGroupInputRequestTypeDef

delete_group

Deletes the specified resource group.

Type annotations and code completion for boto3.client("resource-groups").delete_group method. boto3 documentation

Method definition
def delete_group(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
) -> DeleteGroupOutputTypeDef:  # (1)
    ...
  1. See DeleteGroupOutputTypeDef
Usage example with kwargs
kwargs: DeleteGroupInputRequestTypeDef = {  # (1)
    "GroupName": ...,
}

parent.delete_group(**kwargs)
  1. See DeleteGroupInputRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("resource-groups").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_group

Returns information about a specified resource group.

Type annotations and code completion for boto3.client("resource-groups").get_group method. boto3 documentation

Method definition
def get_group(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
) -> GetGroupOutputTypeDef:  # (1)
    ...
  1. See GetGroupOutputTypeDef
Usage example with kwargs
kwargs: GetGroupInputRequestTypeDef = {  # (1)
    "GroupName": ...,
}

parent.get_group(**kwargs)
  1. See GetGroupInputRequestTypeDef

get_group_configuration

Returns the service configuration associated with the specified resource group.

Type annotations and code completion for boto3.client("resource-groups").get_group_configuration method. boto3 documentation

Method definition
def get_group_configuration(
    self,
    *,
    Group: str = ...,
) -> GetGroupConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetGroupConfigurationOutputTypeDef
Usage example with kwargs
kwargs: GetGroupConfigurationInputRequestTypeDef = {  # (1)
    "Group": ...,
}

parent.get_group_configuration(**kwargs)
  1. See GetGroupConfigurationInputRequestTypeDef

get_group_query

Retrieves the resource query associated with the specified resource group.

Type annotations and code completion for boto3.client("resource-groups").get_group_query method. boto3 documentation

Method definition
def get_group_query(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
) -> GetGroupQueryOutputTypeDef:  # (1)
    ...
  1. See GetGroupQueryOutputTypeDef
Usage example with kwargs
kwargs: GetGroupQueryInputRequestTypeDef = {  # (1)
    "GroupName": ...,
}

parent.get_group_query(**kwargs)
  1. See GetGroupQueryInputRequestTypeDef

get_tags

Returns a list of tags that are associated with a resource group, specified by an ARN.

Type annotations and code completion for boto3.client("resource-groups").get_tags method. boto3 documentation

Method definition
def get_tags(
    self,
    *,
    Arn: str,
) -> GetTagsOutputTypeDef:  # (1)
    ...
  1. See GetTagsOutputTypeDef
Usage example with kwargs
kwargs: GetTagsInputRequestTypeDef = {  # (1)
    "Arn": ...,
}

parent.get_tags(**kwargs)
  1. See GetTagsInputRequestTypeDef

group_resources

Adds the specified resources to the specified group.

Type annotations and code completion for boto3.client("resource-groups").group_resources method. boto3 documentation

Method definition
def group_resources(
    self,
    *,
    Group: str,
    ResourceArns: Sequence[str],
) -> GroupResourcesOutputTypeDef:  # (1)
    ...
  1. See GroupResourcesOutputTypeDef
Usage example with kwargs
kwargs: GroupResourcesInputRequestTypeDef = {  # (1)
    "Group": ...,
    "ResourceArns": ...,
}

parent.group_resources(**kwargs)
  1. See GroupResourcesInputRequestTypeDef

list_group_resources

Returns a list of ARNs of the resources that are members of a specified resource group.

Type annotations and code completion for boto3.client("resource-groups").list_group_resources method. boto3 documentation

Method definition
def list_group_resources(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
    Filters: Sequence[ResourceFilterTypeDef] = ...,  # (1)
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListGroupResourcesOutputTypeDef:  # (2)
    ...
  1. See ResourceFilterTypeDef
  2. See ListGroupResourcesOutputTypeDef
Usage example with kwargs
kwargs: ListGroupResourcesInputRequestTypeDef = {  # (1)
    "GroupName": ...,
}

parent.list_group_resources(**kwargs)
  1. See ListGroupResourcesInputRequestTypeDef

list_groups

Returns a list of existing resource groups in your account.

Type annotations and code completion for boto3.client("resource-groups").list_groups method. boto3 documentation

Method definition
def list_groups(
    self,
    *,
    Filters: Sequence[GroupFilterTypeDef] = ...,  # (1)
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListGroupsOutputTypeDef:  # (2)
    ...
  1. See GroupFilterTypeDef
  2. See ListGroupsOutputTypeDef
Usage example with kwargs
kwargs: ListGroupsInputRequestTypeDef = {  # (1)
    "Filters": ...,
}

parent.list_groups(**kwargs)
  1. See ListGroupsInputRequestTypeDef

put_group_configuration

Attaches a service configuration to the specified group.

Type annotations and code completion for boto3.client("resource-groups").put_group_configuration method. boto3 documentation

Method definition
def put_group_configuration(
    self,
    *,
    Group: str = ...,
    Configuration: Sequence[GroupConfigurationItemTypeDef] = ...,  # (1)
) -> Dict[str, Any]:
    ...
  1. See GroupConfigurationItemTypeDef
Usage example with kwargs
kwargs: PutGroupConfigurationInputRequestTypeDef = {  # (1)
    "Group": ...,
}

parent.put_group_configuration(**kwargs)
  1. See PutGroupConfigurationInputRequestTypeDef

search_resources

Returns a list of AWS resource identifiers that matches the specified query.

Type annotations and code completion for boto3.client("resource-groups").search_resources method. boto3 documentation

Method definition
def search_resources(
    self,
    *,
    ResourceQuery: ResourceQueryTypeDef,  # (1)
    MaxResults: int = ...,
    NextToken: str = ...,
) -> SearchResourcesOutputTypeDef:  # (2)
    ...
  1. See ResourceQueryTypeDef
  2. See SearchResourcesOutputTypeDef
Usage example with kwargs
kwargs: SearchResourcesInputRequestTypeDef = {  # (1)
    "ResourceQuery": ...,
}

parent.search_resources(**kwargs)
  1. See SearchResourcesInputRequestTypeDef

tag

Adds tags to a resource group with the specified ARN.

Type annotations and code completion for boto3.client("resource-groups").tag method. boto3 documentation

Method definition
def tag(
    self,
    *,
    Arn: str,
    Tags: Mapping[str, str],
) -> TagOutputTypeDef:  # (1)
    ...
  1. See TagOutputTypeDef
Usage example with kwargs
kwargs: TagInputRequestTypeDef = {  # (1)
    "Arn": ...,
    "Tags": ...,
}

parent.tag(**kwargs)
  1. See TagInputRequestTypeDef

ungroup_resources

Removes the specified resources from the specified group.

Type annotations and code completion for boto3.client("resource-groups").ungroup_resources method. boto3 documentation

Method definition
def ungroup_resources(
    self,
    *,
    Group: str,
    ResourceArns: Sequence[str],
) -> UngroupResourcesOutputTypeDef:  # (1)
    ...
  1. See UngroupResourcesOutputTypeDef
Usage example with kwargs
kwargs: UngroupResourcesInputRequestTypeDef = {  # (1)
    "Group": ...,
    "ResourceArns": ...,
}

parent.ungroup_resources(**kwargs)
  1. See UngroupResourcesInputRequestTypeDef

untag

Deletes tags from a specified resource group.

Type annotations and code completion for boto3.client("resource-groups").untag method. boto3 documentation

Method definition
def untag(
    self,
    *,
    Arn: str,
    Keys: Sequence[str],
) -> UntagOutputTypeDef:  # (1)
    ...
  1. See UntagOutputTypeDef
Usage example with kwargs
kwargs: UntagInputRequestTypeDef = {  # (1)
    "Arn": ...,
    "Keys": ...,
}

parent.untag(**kwargs)
  1. See UntagInputRequestTypeDef

update_group

Updates the description for an existing group.

Type annotations and code completion for boto3.client("resource-groups").update_group method. boto3 documentation

Method definition
def update_group(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
    Description: str = ...,
) -> UpdateGroupOutputTypeDef:  # (1)
    ...
  1. See UpdateGroupOutputTypeDef
Usage example with kwargs
kwargs: UpdateGroupInputRequestTypeDef = {  # (1)
    "GroupName": ...,
}

parent.update_group(**kwargs)
  1. See UpdateGroupInputRequestTypeDef

update_group_query

Updates the resource query of a group.

Type annotations and code completion for boto3.client("resource-groups").update_group_query method. boto3 documentation

Method definition
def update_group_query(
    self,
    *,
    ResourceQuery: ResourceQueryTypeDef,  # (1)
    GroupName: str = ...,
    Group: str = ...,
) -> UpdateGroupQueryOutputTypeDef:  # (2)
    ...
  1. See ResourceQueryTypeDef
  2. See UpdateGroupQueryOutputTypeDef
Usage example with kwargs
kwargs: UpdateGroupQueryInputRequestTypeDef = {  # (1)
    "ResourceQuery": ...,
}

parent.update_group_query(**kwargs)
  1. See UpdateGroupQueryInputRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("resource-groups").get_paginator method with overloads.