Skip to content

CloudFormationServiceResource

Index > CloudFormation > CloudFormationServiceResource

Auto-generated documentation for CloudFormation type annotations stubs module mypy-boto3-cloudformation.

CloudFormationServiceResource

Type annotations and code completion for boto3.resource("cloudformation"), included resources and collections. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import CloudFormationServiceResource

def get_cloudformation_resource() -> CloudFormationServiceResource:
    return boto3.resource("cloudformation")

Attributes

Collections

ServiceResourceStacksCollection

Provides access to Stack resource.

Type annotations and code completion for boto3.resource("cloudformation").stacks collection. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import ServiceResourceStacksCollection

def get_collection() -> ServiceResourceStacksCollection:
    return boto3.resource("cloudformation").stacks

Methods

CloudFormationServiceResource.Event method

Creates a Event resource.

Type annotations and code completion for boto3.resource("cloudformation").Event method. boto3 documentation

Method definition
def Event(
    self,
    id: str,
) -> Event:
    ...
Usage example with kwargs
kwargs: ServiceResourceEventRequestTypeDef = {  # (1)
    "id": ...,
}

parent.Event(**kwargs)
  1. See ServiceResourceEventRequestTypeDef

CloudFormationServiceResource.Stack method

Creates a Stack resource.

Type annotations and code completion for boto3.resource("cloudformation").Stack method. boto3 documentation

Method definition
def Stack(
    self,
    name: str,
) -> Stack:
    ...
Usage example with kwargs
kwargs: ServiceResourceStackRequestTypeDef = {  # (1)
    "name": ...,
}

parent.Stack(**kwargs)
  1. See ServiceResourceStackRequestTypeDef

CloudFormationServiceResource.StackResource method

Creates a StackResource resource.

Type annotations and code completion for boto3.resource("cloudformation").StackResource method. boto3 documentation

Method definition
def StackResource(
    self,
    stack_name: str,
    logical_id: str,
) -> StackResource:
    ...
Usage example with kwargs
kwargs: ServiceResourceStackResourceRequestTypeDef = {  # (1)
    "stack_name": ...,
    "logical_id": ...,
}

parent.StackResource(**kwargs)
  1. See ServiceResourceStackResourceRequestTypeDef

CloudFormationServiceResource.StackResourceSummary method

Creates a StackResourceSummary resource.

Type annotations and code completion for boto3.resource("cloudformation").StackResourceSummary method. boto3 documentation

Method definition
def StackResourceSummary(
    self,
    stack_name: str,
    logical_id: str,
) -> StackResourceSummary:
    ...
Usage example with kwargs
kwargs: ServiceResourceStackResourceSummaryRequestTypeDef = {  # (1)
    "stack_name": ...,
    "logical_id": ...,
}

parent.StackResourceSummary(**kwargs)
  1. See ServiceResourceStackResourceSummaryRequestTypeDef

CloudFormationServiceResource.create_stack method

Creates a stack as specified in the template.

Type annotations and code completion for boto3.resource("cloudformation").create_stack method. boto3 documentation

Method definition
def create_stack(
    self,
    *,
    StackName: str,
    TemplateBody: str = ...,
    TemplateURL: str = ...,
    Parameters: Sequence[ParameterTypeDef] = ...,  # (1)
    DisableRollback: bool = ...,
    RollbackConfiguration: RollbackConfigurationTypeDef = ...,  # (2)
    TimeoutInMinutes: int = ...,
    NotificationARNs: Sequence[str] = ...,
    Capabilities: Sequence[CapabilityType] = ...,  # (3)
    ResourceTypes: Sequence[str] = ...,
    RoleARN: str = ...,
    OnFailure: OnFailureType = ...,  # (4)
    StackPolicyBody: str = ...,
    StackPolicyURL: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (5)
    ClientRequestToken: str = ...,
    EnableTerminationProtection: bool = ...,
) -> Stack:
    ...
  1. See ParameterTypeDef
  2. See RollbackConfigurationTypeDef
  3. See CapabilityType
  4. See OnFailureType
  5. See TagTypeDef
Usage example with kwargs
kwargs: CreateStackInputServiceResourceCreateStackTypeDef = {  # (1)
    "StackName": ...,
}

parent.create_stack(**kwargs)
  1. See CreateStackInputServiceResourceCreateStackTypeDef

CloudFormationServiceResource.get_available_subresources method

Returns a list of all the available sub-resources for this Resource.

Type annotations and code completion for boto3.resource("cloudformation").get_available_subresources method. boto3 documentation

Method definition
def get_available_subresources(
    self,
) -> Sequence[str]:
    ...

Event

Type annotations and code completion for boto3.resource("cloudformation").Event class. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import Event

def get_resource() -> Event:
    return boto3.resource("cloudformation").Event(...)

Event attributes

  • stack_id: str
  • event_id: str
  • stack_name: str
  • logical_resource_id: str
  • physical_resource_id: str
  • resource_type: str
  • timestamp: datetime
  • resource_status: ResourceStatusType
  • resource_status_reason: str
  • resource_properties: str
  • client_request_token: str
  • hook_type: str
  • hook_status: HookStatusType
  • hook_status_reason: str
  • hook_invocation_point: Literal['PRE_PROVISION'] (see HookInvocationPointType)
  • hook_failure_mode: HookFailureModeType
  • id: str

Event methods

Event.get_available_subresources method

Returns a list of all the available sub-resources for this Resource.

Type annotations and code completion for boto3.resource("cloudformation").get_available_subresources method. boto3 documentation

Method definition
def get_available_subresources(
    self,
) -> Sequence[str]:
    ...

Stack

Type annotations and code completion for boto3.resource("cloudformation").Stack class. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import Stack

def get_resource() -> Stack:
    return boto3.resource("cloudformation").Stack(...)

Stack attributes

Stack collections

Stack.events

Provides access to Event resource.

Type annotations and code completion for boto3.resource("cloudformation").Stack(...).events collection. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import StackEventsCollection

def get_collection() -> StackEventsCollection:
    resource = boto3.resource("cloudformation").Stack(...)
    return resource.events

Stack.resource_summaries

Provides access to StackResourceSummary resource.

Type annotations and code completion for boto3.resource("cloudformation").Stack(...).resource_summaries collection. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import StackResourceSummariesCollection

def get_collection() -> StackResourceSummariesCollection:
    resource = boto3.resource("cloudformation").Stack(...)
    return resource.resource_summaries

Stack methods

Stack.Resource method

Creates a StackResource resource.

Type annotations and code completion for boto3.resource("cloudformation").Resource method. boto3 documentation

Method definition
def Resource(
    self,
    logical_id: str,
) -> StackResource:
    ...
Usage example with kwargs
kwargs: StackResourceRequestTypeDef = {  # (1)
    "logical_id": ...,
}

parent.Resource(**kwargs)
  1. See StackResourceRequestTypeDef

Stack.cancel_update method

Cancels an update on the specified stack.

Type annotations and code completion for boto3.resource("cloudformation").cancel_update method. boto3 documentation

Method definition
def cancel_update(
    self,
    *,
    ClientRequestToken: str = ...,
) -> None:
    ...
Usage example with kwargs
kwargs: CancelUpdateStackInputStackCancelUpdateTypeDef = {  # (1)
    "ClientRequestToken": ...,
}

parent.cancel_update(**kwargs)
  1. See CancelUpdateStackInputStackCancelUpdateTypeDef

Stack.delete method

Deletes a specified stack.

Type annotations and code completion for boto3.resource("cloudformation").delete method. boto3 documentation

Method definition
def delete(
    self,
    *,
    RetainResources: Sequence[str] = ...,
    RoleARN: str = ...,
    ClientRequestToken: str = ...,
) -> None:
    ...
Usage example with kwargs
kwargs: DeleteStackInputStackDeleteTypeDef = {  # (1)
    "RetainResources": ...,
}

parent.delete(**kwargs)
  1. See DeleteStackInputStackDeleteTypeDef

Stack.get_available_subresources method

Returns a list of all the available sub-resources for this Resource.

Type annotations and code completion for boto3.resource("cloudformation").get_available_subresources method. boto3 documentation

Method definition
def get_available_subresources(
    self,
) -> Sequence[str]:
    ...

Stack.load method

Calls 🇵🇾meth:CloudFormation.Client.describe_stacks to update the attributes of the Stack resource.

Type annotations and code completion for boto3.resource("cloudformation").load method. boto3 documentation

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

Stack.reload method

Calls 🇵🇾meth:CloudFormation.Client.describe_stacks to update the attributes of the Stack resource.

Type annotations and code completion for boto3.resource("cloudformation").reload method. boto3 documentation

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

Stack.update method

Updates a stack as specified in the template.

Type annotations and code completion for boto3.resource("cloudformation").update method. boto3 documentation

Method definition
def update(
    self,
    *,
    TemplateBody: str = ...,
    TemplateURL: str = ...,
    UsePreviousTemplate: bool = ...,
    StackPolicyDuringUpdateBody: str = ...,
    StackPolicyDuringUpdateURL: str = ...,
    Parameters: Sequence[ParameterTypeDef] = ...,  # (1)
    Capabilities: Sequence[CapabilityType] = ...,  # (2)
    ResourceTypes: Sequence[str] = ...,
    RoleARN: str = ...,
    RollbackConfiguration: RollbackConfigurationTypeDef = ...,  # (3)
    StackPolicyBody: str = ...,
    StackPolicyURL: str = ...,
    NotificationARNs: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (4)
    DisableRollback: bool = ...,
    ClientRequestToken: str = ...,
) -> UpdateStackOutputTypeDef:  # (5)
    ...
  1. See ParameterTypeDef
  2. See CapabilityType
  3. See RollbackConfigurationTypeDef
  4. See TagTypeDef
  5. See UpdateStackOutputTypeDef
Usage example with kwargs
kwargs: UpdateStackInputStackUpdateTypeDef = {  # (1)
    "TemplateBody": ...,
}

parent.update(**kwargs)
  1. See UpdateStackInputStackUpdateTypeDef

StackResource

Type annotations and code completion for boto3.resource("cloudformation").StackResource class. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import StackResource

def get_resource() -> StackResource:
    return boto3.resource("cloudformation").StackResource(...)

StackResource attributes

StackResource methods

StackResource.Stack method

Creates a Stack resource.

Type annotations and code completion for boto3.resource("cloudformation").Stack method. boto3 documentation

Method definition
def Stack(
    self,
) -> Stack:
    ...

StackResource.get_available_subresources method

Returns a list of all the available sub-resources for this Resource.

Type annotations and code completion for boto3.resource("cloudformation").get_available_subresources method. boto3 documentation

Method definition
def get_available_subresources(
    self,
) -> Sequence[str]:
    ...

StackResource.load method

Calls 🇵🇾meth:CloudFormation.Client.describe_stack_resource to update the attributes of the StackResource resource.

Type annotations and code completion for boto3.resource("cloudformation").load method. boto3 documentation

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

StackResource.reload method

Calls 🇵🇾meth:CloudFormation.Client.describe_stack_resource to update the attributes of the StackResource resource.

Type annotations and code completion for boto3.resource("cloudformation").reload method. boto3 documentation

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

StackResourceSummary

Type annotations and code completion for boto3.resource("cloudformation").StackResourceSummary class. boto3 documentation

Usage example
from mypy_boto3_cloudformation.service_resource import StackResourceSummary

def get_resource() -> StackResourceSummary:
    return boto3.resource("cloudformation").StackResourceSummary(...)

StackResourceSummary attributes

StackResourceSummary methods

StackResourceSummary.Resource method

Creates a StackResource resource.

Type annotations and code completion for boto3.resource("cloudformation").Resource method. boto3 documentation

Method definition
def Resource(
    self,
) -> StackResource:
    ...

StackResourceSummary.get_available_subresources method

Returns a list of all the available sub-resources for this Resource.

Type annotations and code completion for boto3.resource("cloudformation").get_available_subresources method. boto3 documentation

Method definition
def get_available_subresources(
    self,
) -> Sequence[str]:
    ...