Skip to content

NeptuneClient#

Index > Neptune > NeptuneClient

Auto-generated documentation for Neptune type annotations stubs module mypy-boto3-neptune.

NeptuneClient#

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

# NeptuneClient usage example

from boto3.session import Session
from mypy_boto3_neptune.client import NeptuneClient

def get_neptune_client() -> NeptuneClient:
    return Session().client("neptune")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("neptune")

try:
    do_something(client)
except (
    client.exceptions.AuthorizationNotFoundFault,
    client.exceptions.CertificateNotFoundFault,
    client.exceptions.ClientError,
    client.exceptions.DBClusterAlreadyExistsFault,
    client.exceptions.DBClusterEndpointAlreadyExistsFault,
    client.exceptions.DBClusterEndpointNotFoundFault,
    client.exceptions.DBClusterEndpointQuotaExceededFault,
    client.exceptions.DBClusterNotFoundFault,
    client.exceptions.DBClusterParameterGroupNotFoundFault,
    client.exceptions.DBClusterQuotaExceededFault,
    client.exceptions.DBClusterRoleAlreadyExistsFault,
    client.exceptions.DBClusterRoleNotFoundFault,
    client.exceptions.DBClusterRoleQuotaExceededFault,
    client.exceptions.DBClusterSnapshotAlreadyExistsFault,
    client.exceptions.DBClusterSnapshotNotFoundFault,
    client.exceptions.DBInstanceAlreadyExistsFault,
    client.exceptions.DBInstanceNotFoundFault,
    client.exceptions.DBParameterGroupAlreadyExistsFault,
    client.exceptions.DBParameterGroupNotFoundFault,
    client.exceptions.DBParameterGroupQuotaExceededFault,
    client.exceptions.DBSecurityGroupNotFoundFault,
    client.exceptions.DBSnapshotAlreadyExistsFault,
    client.exceptions.DBSnapshotNotFoundFault,
    client.exceptions.DBSubnetGroupAlreadyExistsFault,
    client.exceptions.DBSubnetGroupDoesNotCoverEnoughAZs,
    client.exceptions.DBSubnetGroupNotFoundFault,
    client.exceptions.DBSubnetGroupQuotaExceededFault,
    client.exceptions.DBSubnetQuotaExceededFault,
    client.exceptions.DBUpgradeDependencyFailureFault,
    client.exceptions.DomainNotFoundFault,
    client.exceptions.EventSubscriptionQuotaExceededFault,
    client.exceptions.GlobalClusterAlreadyExistsFault,
    client.exceptions.GlobalClusterNotFoundFault,
    client.exceptions.GlobalClusterQuotaExceededFault,
    client.exceptions.InstanceQuotaExceededFault,
    client.exceptions.InsufficientDBClusterCapacityFault,
    client.exceptions.InsufficientDBInstanceCapacityFault,
    client.exceptions.InsufficientStorageClusterCapacityFault,
    client.exceptions.InvalidDBClusterEndpointStateFault,
    client.exceptions.InvalidDBClusterSnapshotStateFault,
    client.exceptions.InvalidDBClusterStateFault,
    client.exceptions.InvalidDBInstanceStateFault,
    client.exceptions.InvalidDBParameterGroupStateFault,
    client.exceptions.InvalidDBSecurityGroupStateFault,
    client.exceptions.InvalidDBSnapshotStateFault,
    client.exceptions.InvalidDBSubnetGroupStateFault,
    client.exceptions.InvalidDBSubnetStateFault,
    client.exceptions.InvalidEventSubscriptionStateFault,
    client.exceptions.InvalidGlobalClusterStateFault,
    client.exceptions.InvalidRestoreFault,
    client.exceptions.InvalidSubnet,
    client.exceptions.InvalidVPCNetworkStateFault,
    client.exceptions.KMSKeyNotAccessibleFault,
    client.exceptions.OptionGroupNotFoundFault,
    client.exceptions.ProvisionedIopsNotAvailableInAZFault,
    client.exceptions.ResourceNotFoundFault,
    client.exceptions.SNSInvalidTopicFault,
    client.exceptions.SNSNoAuthorizationFault,
    client.exceptions.SNSTopicArnNotFoundFault,
    client.exceptions.SharedSnapshotQuotaExceededFault,
    client.exceptions.SnapshotQuotaExceededFault,
    client.exceptions.SourceNotFoundFault,
    client.exceptions.StorageQuotaExceededFault,
    client.exceptions.StorageTypeNotSupportedFault,
    client.exceptions.SubnetAlreadyInUse,
    client.exceptions.SubscriptionAlreadyExistFault,
    client.exceptions.SubscriptionCategoryNotFoundFault,
    client.exceptions.SubscriptionNotFoundFault,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_neptune.client import Exceptions

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

Methods#

add_role_to_db_cluster#

Associates an Identity and Access Management (IAM) role with an Neptune DB cluster.

Type annotations and code completion for boto3.client("neptune").add_role_to_db_cluster method. boto3 documentation

# add_role_to_db_cluster method definition

def add_role_to_db_cluster(
    self,
    *,
    DBClusterIdentifier: str,
    RoleArn: str,
    FeatureName: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# add_role_to_db_cluster method usage example with argument unpacking

kwargs: AddRoleToDBClusterMessageRequestTypeDef = {  # (1)
    "DBClusterIdentifier": ...,
    "RoleArn": ...,
}

parent.add_role_to_db_cluster(**kwargs)
  1. See AddRoleToDBClusterMessageRequestTypeDef

add_source_identifier_to_subscription#

Adds a source identifier to an existing event notification subscription.

Type annotations and code completion for boto3.client("neptune").add_source_identifier_to_subscription method. boto3 documentation

# add_source_identifier_to_subscription method definition

def add_source_identifier_to_subscription(
    self,
    *,
    SubscriptionName: str,
    SourceIdentifier: str,
) -> AddSourceIdentifierToSubscriptionResultTypeDef:  # (1)
    ...
  1. See AddSourceIdentifierToSubscriptionResultTypeDef
# add_source_identifier_to_subscription method usage example with argument unpacking

kwargs: AddSourceIdentifierToSubscriptionMessageRequestTypeDef = {  # (1)
    "SubscriptionName": ...,
    "SourceIdentifier": ...,
}

parent.add_source_identifier_to_subscription(**kwargs)
  1. See AddSourceIdentifierToSubscriptionMessageRequestTypeDef

add_tags_to_resource#

Adds metadata tags to an Amazon Neptune resource.

Type annotations and code completion for boto3.client("neptune").add_tags_to_resource method. boto3 documentation

# add_tags_to_resource method definition

def add_tags_to_resource(
    self,
    *,
    ResourceName: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See EmptyResponseMetadataTypeDef
# add_tags_to_resource method usage example with argument unpacking

kwargs: AddTagsToResourceMessageRequestTypeDef = {  # (1)
    "ResourceName": ...,
    "Tags": ...,
}

parent.add_tags_to_resource(**kwargs)
  1. See AddTagsToResourceMessageRequestTypeDef

apply_pending_maintenance_action#

Applies a pending maintenance action to a resource (for example, to a DB instance).

Type annotations and code completion for boto3.client("neptune").apply_pending_maintenance_action method. boto3 documentation

# apply_pending_maintenance_action method definition

def apply_pending_maintenance_action(
    self,
    *,
    ResourceIdentifier: str,
    ApplyAction: str,
    OptInType: str,
) -> ApplyPendingMaintenanceActionResultTypeDef:  # (1)
    ...
  1. See ApplyPendingMaintenanceActionResultTypeDef
# apply_pending_maintenance_action method usage example with argument unpacking

kwargs: ApplyPendingMaintenanceActionMessageRequestTypeDef = {  # (1)
    "ResourceIdentifier": ...,
    "ApplyAction": ...,
    "OptInType": ...,
}

parent.apply_pending_maintenance_action(**kwargs)
  1. See ApplyPendingMaintenanceActionMessageRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# close method definition

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

copy_db_cluster_parameter_group#

Copies the specified DB cluster parameter group.

Type annotations and code completion for boto3.client("neptune").copy_db_cluster_parameter_group method. boto3 documentation

# copy_db_cluster_parameter_group method definition

def copy_db_cluster_parameter_group(
    self,
    *,
    SourceDBClusterParameterGroupIdentifier: str,
    TargetDBClusterParameterGroupIdentifier: str,
    TargetDBClusterParameterGroupDescription: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CopyDBClusterParameterGroupResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CopyDBClusterParameterGroupResultTypeDef
# copy_db_cluster_parameter_group method usage example with argument unpacking

kwargs: CopyDBClusterParameterGroupMessageRequestTypeDef = {  # (1)
    "SourceDBClusterParameterGroupIdentifier": ...,
    "TargetDBClusterParameterGroupIdentifier": ...,
    "TargetDBClusterParameterGroupDescription": ...,
}

parent.copy_db_cluster_parameter_group(**kwargs)
  1. See CopyDBClusterParameterGroupMessageRequestTypeDef

copy_db_cluster_snapshot#

Copies a snapshot of a DB cluster.

Type annotations and code completion for boto3.client("neptune").copy_db_cluster_snapshot method. boto3 documentation

# copy_db_cluster_snapshot method definition

def copy_db_cluster_snapshot(
    self,
    *,
    SourceDBClusterSnapshotIdentifier: str,
    TargetDBClusterSnapshotIdentifier: str,
    KmsKeyId: str = ...,
    PreSignedUrl: str = ...,
    CopyTags: bool = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    SourceRegion: str = ...,
) -> CopyDBClusterSnapshotResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CopyDBClusterSnapshotResultTypeDef
# copy_db_cluster_snapshot method usage example with argument unpacking

kwargs: CopyDBClusterSnapshotMessageRequestTypeDef = {  # (1)
    "SourceDBClusterSnapshotIdentifier": ...,
    "TargetDBClusterSnapshotIdentifier": ...,
}

parent.copy_db_cluster_snapshot(**kwargs)
  1. See CopyDBClusterSnapshotMessageRequestTypeDef

copy_db_parameter_group#

Copies the specified DB parameter group.

Type annotations and code completion for boto3.client("neptune").copy_db_parameter_group method. boto3 documentation

# copy_db_parameter_group method definition

def copy_db_parameter_group(
    self,
    *,
    SourceDBParameterGroupIdentifier: str,
    TargetDBParameterGroupIdentifier: str,
    TargetDBParameterGroupDescription: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CopyDBParameterGroupResultTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CopyDBParameterGroupResultTypeDef
# copy_db_parameter_group method usage example with argument unpacking

kwargs: CopyDBParameterGroupMessageRequestTypeDef = {  # (1)
    "SourceDBParameterGroupIdentifier": ...,
    "TargetDBParameterGroupIdentifier": ...,
    "TargetDBParameterGroupDescription": ...,
}

parent.copy_db_parameter_group(**kwargs)
  1. See CopyDBParameterGroupMessageRequestTypeDef

create_db_cluster#

Creates a new Amazon Neptune DB cluster.

Type annotations and code completion for boto3.client("neptune").create_db_cluster method. boto3 documentation

# create_db_cluster method definition

def create_db_cluster(
    self,
    *,
    DBClusterIdentifier: str,
    Engine: str,
    AvailabilityZones: Sequence[str] = ...,
    BackupRetentionPeriod: int = ...,
    CharacterSetName: str = ...,
    CopyTagsToSnapshot: bool = ...,
    DatabaseName: str = ...,
    DBClusterParameterGroupName: str = ...,
    VpcSecurityGroupIds: Sequence[str] = ...,
    DBSubnetGroupName: str = ...,
    EngineVersion: str = ...,
    Port: int = ...,
    MasterUsername: str = ...,
    MasterUserPassword: str = ...,
    OptionGroupName: str = ...,
    PreferredBackupWindow: str = ...,
    PreferredMaintenanceWindow: str = ...,
    ReplicationSourceIdentifier: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    StorageEncrypted: bool = ...,
    KmsKeyId: str = ...,
    PreSignedUrl: str = ...,
    EnableIAMDatabaseAuthentication: bool = ...,
    EnableCloudwatchLogsExports: Sequence[str] = ...,
    DeletionProtection: bool = ...,
    ServerlessV2ScalingConfiguration: ServerlessV2ScalingConfigurationTypeDef = ...,  # (2)
    GlobalClusterIdentifier: str = ...,
    StorageType: str = ...,
    SourceRegion: str = ...,
) -> CreateDBClusterResultTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See ServerlessV2ScalingConfigurationTypeDef
  3. See CreateDBClusterResultTypeDef
# create_db_cluster method usage example with argument unpacking

kwargs: CreateDBClusterMessageRequestTypeDef = {  # (1)
    "DBClusterIdentifier": ...,
    "Engine": ...,
}

parent.create_db_cluster(**kwargs)
  1. See