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

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

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

# Event method definition

def Event(
    self,
    id: str,
) -> Event:
    ...

CloudFormationServiceResource.Stack method#

Creates a Stack resource.

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

# Stack method definition

def Stack(
    self,
    name: str,
) -> Stack:
    ...

CloudFormationServiceResource.StackResource method#

Creates a StackResource resource.

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

# StackResource method definition

def StackResource(
    self,
    stack_name: str,
    logical_id: str,
) -> StackResource:
    ...

CloudFormationServiceResource.StackResourceSummary method#

Creates a StackResourceSummary resource.

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

# StackResourceSummary method definition

def StackResourceSummary(
    self,
    stack_name: str,
    logical_id: str,
) -> StackResourceSummary:
    ...

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

# create_stack method definition

def create_stack(
    self,
    *,
    StackName: str,
    TemplateBody: str = ...,
    TemplateURL: str = ...,
    Parameters: Sequence[ParameterTypeDef] = ...,  # (1)
    DisableRollback: bool = ...,
    RollbackConfiguration: Union[RollbackConfigurationTypeDef, RollbackConfigurationExtraOutputTypeDef] = ...,  # (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 = ...,
    RetainExceptOnCreate: bool = ...,
) -> Stack:
    ...
  1. See ParameterTypeDef
  2. See RollbackConfigurationTypeDef RollbackConfigurationExtraOutputTypeDef
  3. See CapabilityType
  4. See OnFailureType
  5. See TagTypeDef
# create_stack method usage example with argument unpacking

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

# get_available_subresources method definition

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

Event#

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

# Event usage example

from mypy_boto3_cloudformation.service_resource import Event

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

Event attributes#

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

# get_available_subresources method definition

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

Stack#

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

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

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

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