Skip to content

SSMClient#

Index > SSM > SSMClient

Auto-generated documentation for SSM type annotations stubs module mypy-boto3-ssm.

SSMClient#

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

# SSMClient usage example

from boto3.session import Session
from mypy_boto3_ssm.client import SSMClient

def get_ssm_client() -> SSMClient:
    return Session().client("ssm")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("ssm")

try:
    do_something(client)
except (
    client.exceptions.AlreadyExistsException,
    client.exceptions.AssociatedInstances,
    client.exceptions.AssociationAlreadyExists,
    client.exceptions.AssociationDoesNotExist,
    client.exceptions.AssociationExecutionDoesNotExist,
    client.exceptions.AssociationLimitExceeded,
    client.exceptions.AssociationVersionLimitExceeded,
    client.exceptions.AutomationDefinitionNotApprovedException,
    client.exceptions.AutomationDefinitionNotFoundException,
    client.exceptions.AutomationDefinitionVersionNotFoundException,
    client.exceptions.AutomationExecutionLimitExceededException,
    client.exceptions.AutomationExecutionNotFoundException,
    client.exceptions.AutomationStepNotFoundException,
    client.exceptions.ClientError,
    client.exceptions.ComplianceTypeCountLimitExceededException,
    client.exceptions.CustomSchemaCountLimitExceededException,
    client.exceptions.DocumentAlreadyExists,
    client.exceptions.DocumentLimitExceeded,
    client.exceptions.DocumentPermissionLimit,
    client.exceptions.DocumentVersionLimitExceeded,
    client.exceptions.DoesNotExistException,
    client.exceptions.DuplicateDocumentContent,
    client.exceptions.DuplicateDocumentVersionName,
    client.exceptions.DuplicateInstanceId,
    client.exceptions.FeatureNotAvailableException,
    client.exceptions.HierarchyLevelLimitExceededException,
    client.exceptions.HierarchyTypeMismatchException,
    client.exceptions.IdempotentParameterMismatch,
    client.exceptions.IncompatiblePolicyException,
    client.exceptions.InternalServerError,
    client.exceptions.InvalidActivation,
    client.exceptions.InvalidActivationId,
    client.exceptions.InvalidAggregatorException,
    client.exceptions.InvalidAllowedPatternException,
    client.exceptions.InvalidAssociation,
    client.exceptions.InvalidAssociationVersion,
    client.exceptions.InvalidAutomationExecutionParametersException,
    client.exceptions.InvalidAutomationSignalException,
    client.exceptions.InvalidAutomationStatusUpdateException,
    client.exceptions.InvalidCommandId,
    client.exceptions.InvalidDeleteInventoryParametersException,
    client.exceptions.InvalidDeletionIdException,
    client.exceptions.InvalidDocument,
    client.exceptions.InvalidDocumentContent,
    client.exceptions.InvalidDocumentOperation,
    client.exceptions.InvalidDocumentSchemaVersion,
    client.exceptions.InvalidDocumentType,
    client.exceptions.InvalidDocumentVersion,
    client.exceptions.InvalidFilter,
    client.exceptions.InvalidFilterKey,
    client.exceptions.InvalidFilterOption,
    client.exceptions.InvalidFilterValue,
    client.exceptions.InvalidInstanceId,
    client.exceptions.InvalidInstanceInformationFilterValue,
    client.exceptions.InvalidInventoryGroupException,
    client.exceptions.InvalidInventoryItemContextException,
    client.exceptions.InvalidInventoryRequestException,
    client.exceptions.InvalidItemContentException,
    client.exceptions.InvalidKeyId,
    client.exceptions.InvalidNextToken,
    client.exceptions.InvalidNotificationConfig,
    client.exceptions.InvalidOptionException,
    client.exceptions.InvalidOutputFolder,
    client.exceptions.InvalidOutputLocation,
    client.exceptions.InvalidParameters,
    client.exceptions.InvalidPermissionType,
    client.exceptions.InvalidPluginName,
    client.exceptions.InvalidPolicyAttributeException,
    client.exceptions.InvalidPolicyTypeException,
    client.exceptions.InvalidResourceId,
    client.exceptions.InvalidResourceType,
    client.exceptions.InvalidResultAttributeException,
    client.exceptions.InvalidRole,
    client.exceptions.InvalidSchedule,
    client.exceptions.InvalidTag,
    client.exceptions.InvalidTarget,
    client.exceptions.InvalidTargetMaps,
    client.exceptions.InvalidTypeNameException,
    client.exceptions.InvalidUpdate,
    client.exceptions.InvocationDoesNotExist,
    client.exceptions.ItemContentMismatchException,
    client.exceptions.ItemSizeLimitExceededException,
    client.exceptions.MaxDocumentSizeExceeded,
    client.exceptions.OpsItemAccessDeniedException,
    client.exceptions.OpsItemAlreadyExistsException,
    client.exceptions.OpsItemConflictException,
    client.exceptions.OpsItemInvalidParameterException,
    client.exceptions.OpsItemLimitExceededException,
    client.exceptions.OpsItemNotFoundException,
    client.exceptions.OpsItemRelatedItemAlreadyExistsException,
    client.exceptions.OpsItemRelatedItemAssociationNotFoundException,
    client.exceptions.OpsMetadataAlreadyExistsException,
    client.exceptions.OpsMetadataInvalidArgumentException,
    client.exceptions.OpsMetadataKeyLimitExceededException,
    client.exceptions.OpsMetadataLimitExceededException,
    client.exceptions.OpsMetadataNotFoundException,
    client.exceptions.OpsMetadataTooManyUpdatesException,
    client.exceptions.ParameterAlreadyExists,
    client.exceptions.ParameterLimitExceeded,
    client.exceptions.ParameterMaxVersionLimitExceeded,
    client.exceptions.ParameterNotFound,
    client.exceptions.ParameterPatternMismatchException,
    client.exceptions.ParameterVersionLabelLimitExceeded,
    client.exceptions.ParameterVersionNotFound,
    client.exceptions.PoliciesLimitExceededException,
    client.exceptions.ResourceDataSyncAlreadyExistsException,
    client.exceptions.ResourceDataSyncConflictException,
    client.exceptions.ResourceDataSyncCountExceededException,
    client.exceptions.ResourceDataSyncInvalidConfigurationException,
    client.exceptions.ResourceDataSyncNotFoundException,
    client.exceptions.ResourceInUseException,
    client.exceptions.ResourceLimitExceededException,
    client.exceptions.ResourcePolicyConflictException,
    client.exceptions.ResourcePolicyInvalidParameterException,
    client.exceptions.ResourcePolicyLimitExceededException,
    client.exceptions.ServiceSettingNotFound,
    client.exceptions.StatusUnchanged,
    client.exceptions.SubTypeCountLimitExceededException,
    client.exceptions.TargetInUseException,
    client.exceptions.TargetNotConnected,
    client.exceptions.TooManyTagsError,
    client.exceptions.TooManyUpdates,
    client.exceptions.TotalSizeLimitExceededException,
    client.exceptions.UnsupportedCalendarException,
    client.exceptions.UnsupportedFeatureRequiredException,
    client.exceptions.UnsupportedInventoryItemContextException,
    client.exceptions.UnsupportedInventorySchemaVersionException,
    client.exceptions.UnsupportedOperatingSystem,
    client.exceptions.UnsupportedParameterType,
    client.exceptions.UnsupportedPlatformType,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_ssm.client import Exceptions

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

Methods#

add_tags_to_resource#

Adds or overwrites one or more tags for the specified resource.

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

# add_tags_to_resource method definition

def add_tags_to_resource(
    self,
    *,
    ResourceType: ResourceTypeForTaggingType,  # (1)
    ResourceId: str,
    Tags: Sequence[TagTypeDef],  # (2)
) -> Dict[str, Any]:
    ...
  1. See ResourceTypeForTaggingType
  2. See TagTypeDef
# add_tags_to_resource method usage example with argument unpacking

kwargs: AddTagsToResourceRequestRequestTypeDef = {  # (1)
    "ResourceType": ...,
    "ResourceId": ...,
    "Tags": ...,
}

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

Associates a related item to a Systems Manager OpsCenter OpsItem.

Type annotations and code completion for boto3.client("ssm").associate_ops_item_related_item method. boto3 documentation

# associate_ops_item_related_item method definition

def associate_ops_item_related_item(
    self,
    *,
    OpsItemId: str,
    AssociationType: str,
    ResourceType: str,
    ResourceUri: str,
) -> AssociateOpsItemRelatedItemResponseTypeDef:  # (1)
    ...
  1. See AssociateOpsItemRelatedItemResponseTypeDef
# associate_ops_item_related_item method usage example with argument unpacking

kwargs: AssociateOpsItemRelatedItemRequestRequestTypeDef = {  # (1)
    "OpsItemId": ...,
    "AssociationType": ...,
    "ResourceType": ...,
    "ResourceUri": ...,
}

parent.associate_ops_item_related_item(**kwargs)
  1. See AssociateOpsItemRelatedItemRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("ssm").can_paginate method. boto3 documentation

# can_paginate method definition

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

cancel_command#

Attempts to cancel the command specified by the Command ID.

Type annotations and code completion for boto3.client("ssm").cancel_command method. boto3 documentation

# cancel_command method definition

def cancel_command(
    self,
    *,
    CommandId: str,
    InstanceIds: Sequence[str] = ...,
) -> Dict[str, Any]:
    ...
# cancel_command method usage example with argument unpacking

kwargs: CancelCommandRequestRequestTypeDef = {  # (1)
    "CommandId": ...,
}

parent.cancel_command(**kwargs)
  1. See CancelCommandRequestRequestTypeDef

cancel_maintenance_window_execution#

Stops a maintenance window execution that is already in progress and cancels any tasks in the window that haven't already starting running.

Type annotations and code completion for boto3.client("ssm").cancel_maintenance_window_execution method. boto3 documentation

# cancel_maintenance_window_execution method definition

def cancel_maintenance_window_execution(
    self,
    *,
    WindowExecutionId: str,
) -> CancelMaintenanceWindowExecutionResultTypeDef:  # (1)
    ...
  1. See CancelMaintenanceWindowExecutionResultTypeDef
# cancel_maintenance_window_execution method usage example with argument unpacking

kwargs: CancelMaintenanceWindowExecutionRequestRequestTypeDef = {  # (1)
    "WindowExecutionId": ...,
}

parent.cancel_maintenance_window_execution(**kwargs)
  1. See CancelMaintenanceWindowExecutionRequestRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("ssm").close method. boto3 documentation

# close method definition

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

create_activation#

Generates an activation code and activation ID you can use to register your on-premises servers, edge devices, or virtual machine (VM) with Amazon Web Services Systems Manager.

Type annotations and