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

# ResourceGroupsClient 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.

# Exceptions.exceptions usage example

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

try:
    do_something(client)
except (
    client.exceptions.BadRequestException,
    client.exceptions.ClientError,
    client.exceptions.ForbiddenException,
    client.exceptions.InternalServerErrorException,
    client.exceptions.MethodNotAllowedException,
    client.exceptions.NotFoundException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.UnauthorizedException,
) as e:
    print(e)
# Exceptions.exceptions 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

# can_paginate 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

# close 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

# create_group method definition

def create_group(
    self,
    *,
    Name: str,
    Description: str = ...,
    ResourceQuery: ResourceQueryTypeDef = ...,  # (1)
    Tags: Mapping[str, str] = ...,
    Configuration: Sequence[Union[GroupConfigurationItemTypeDef, GroupConfigurationItemOutputTypeDef]] = ...,  # (2)
) -> CreateGroupOutputTypeDef:  # (3)
    ...
  1. See ResourceQueryTypeDef
  2. See GroupConfigurationItemTypeDef GroupConfigurationItemOutputTypeDef
  3. See CreateGroupOutputTypeDef
# create_group method usage example with argument unpacking

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

# delete_group method definition

def delete_group(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
) -> DeleteGroupOutputTypeDef:  # (1)
    ...
  1. See DeleteGroupOutputTypeDef
# delete_group method usage example with argument unpacking

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

# generate_presigned_url method definition

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

get_account_settings#

Retrieves the current status of optional features in Resource Groups.

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

# get_account_settings method definition

def get_account_settings(
    self,
) -> GetAccountSettingsOutputTypeDef:  # (1)
    ...
  1. See GetAccountSettingsOutputTypeDef

get_group#

Returns information about a specified resource group.

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

# get_group method definition

def get_group(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
) -> GetGroupOutputTypeDef:  # (1)
    ...
  1. See GetGroupOutputTypeDef
# get_group method usage example with argument unpacking

kwargs: GetGroupInputRequestTypeDef = {  # (1)
    "GroupName": ...,
}

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

get_group_configuration#

Retrieves 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

# get_group_configuration method definition

def get_group_configuration(
    self,
    *,
    Group: str = ...,
) -> GetGroupConfigurationOutputTypeDef:  # (1)
    ...
  1. See GetGroupConfigurationOutputTypeDef
# get_group_configuration method usage example with argument unpacking

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

# get_group_query method definition

def get_group_query(
    self,
    *,
    GroupName: str = ...,
    Group: str = ...,
) -> GetGroupQueryOutputTypeDef:  # (1)
    ...
  1. See GetGroupQueryOutputTypeDef
# get_group_query method usage example with argument unpacking

kwargs: GetGroupQueryInputRequestTypeDef = {  # (1)
    "GroupName": ...,
}

parent.get_group_query(**kwargs)