Skip to content

S3ControlClient#

Index > S3Control > S3ControlClient

Auto-generated documentation for S3Control type annotations stubs module mypy-boto3-s3control.

S3ControlClient#

Type annotations and code completion for boto3.client("s3control"). boto3 documentation

# S3ControlClient usage example

from boto3.session import Session
from mypy_boto3_s3control.client import S3ControlClient

def get_s3control_client() -> S3ControlClient:
    return Session().client("s3control")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("s3control")

try:
    do_something(client)
except (
    client.exceptions.BadRequestException,
    client.exceptions.BucketAlreadyExists,
    client.exceptions.BucketAlreadyOwnedByYou,
    client.exceptions.ClientError,
    client.exceptions.IdempotencyException,
    client.exceptions.InternalServiceException,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.InvalidRequestException,
    client.exceptions.JobStatusException,
    client.exceptions.NoSuchPublicAccessBlockConfiguration,
    client.exceptions.NotFoundException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.TooManyTagsException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_s3control.client import Exceptions

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

Methods#

associate_access_grants_identity_center#

Associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance.

Type annotations and code completion for boto3.client("s3control").associate_access_grants_identity_center method. boto3 documentation

# associate_access_grants_identity_center method definition

def associate_access_grants_identity_center(
    self,
    *,
    AccountId: str,
    IdentityCenterArn: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# associate_access_grants_identity_center method usage example with argument unpacking

kwargs: AssociateAccessGrantsIdentityCenterRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "IdentityCenterArn": ...,
}

parent.associate_access_grants_identity_center(**kwargs)
  1. See AssociateAccessGrantsIdentityCenterRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("s3control").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("s3control").close method. boto3 documentation

# close method definition

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

create_access_grant#

Creates an access grant that gives a grantee access to your S3 data.

Type annotations and code completion for boto3.client("s3control").create_access_grant method. boto3 documentation

# create_access_grant method definition

def create_access_grant(
    self,
    *,
    AccountId: str,
    AccessGrantsLocationId: str,
    Grantee: GranteeTypeDef,  # (1)
    Permission: PermissionType,  # (2)
    AccessGrantsLocationConfiguration: AccessGrantsLocationConfigurationTypeDef = ...,  # (3)
    ApplicationArn: str = ...,
    S3PrefixType: S3PrefixTypeType = ...,  # (4)
    Tags: Sequence[TagTypeDef] = ...,  # (5)
) -> CreateAccessGrantResultTypeDef:  # (6)
    ...
  1. See GranteeTypeDef
  2. See PermissionType
  3. See AccessGrantsLocationConfigurationTypeDef
  4. See S3PrefixTypeType
  5. See TagTypeDef
  6. See CreateAccessGrantResultTypeDef
# create_access_grant method usage example with argument unpacking

kwargs: CreateAccessGrantRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "AccessGrantsLocationId": ...,
    "Grantee": ...,
    "Permission": ...,
}

parent.create_access_grant(**kwargs)
  1. See CreateAccessGrantRequestRequestTypeDef

create_access_grants_instance#

Creates an S3 Access Grants instance, which serves as a logical grouping for access grants.

Type annotations and code completion for boto3.client("s3control").create_access_grants_instance method. boto3 documentation

# create_access_grants_instance method definition

def create_access_grants_instance(
    self,
    *,
    AccountId: str,
    IdentityCenterArn: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateAccessGrantsInstanceResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateAccessGrantsInstanceResultTypeDef
# create_access_grants_instance method usage example with argument unpacking

kwargs: CreateAccessGrantsInstanceRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.create_access_grants_instance(**kwargs)
  1. See CreateAccessGrantsInstanceRequestRequestTypeDef

create_access_grants_location#

The S3 data location that you would like to register in your S3 Access Grants instance.

Type annotations and code completion for boto3.client("s3control").create_access_grants_location method. boto3 documentation

# create_access_grants_location method definition

def create_access_grants_location(
    self,
    *,
    AccountId: str,
    LocationScope: str,
    IAMRoleArn: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateAccessGrantsLocationResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateAccessGrantsLocationResultTypeDef
# create_access_grants_location method usage example with argument unpacking

kwargs: CreateAccessGrantsLocationRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "LocationScope": ...,
    "IAMRoleArn": ...,
}

parent.create_access_grants_location(**kwargs)
  1. See