Stack resources#

Use the stack resources to view and manage resource for a stack for a Rackspace Cloud account.

Find stack resources#

GET /v1/{tenant_id}/stacks/{stack_name}/resources

Finds the canonical URL for the resource list of a specified stack.

The canonical URL is returned for only non-deleted stacks. To fetch the resource list for deleted stacks, use the following endpoint:

/v1/{tenant_id}/stacks/{stack_name}/{stack_id}/resources

This table shows the possible response codes for this operation:

Response Code

Name

Description

302

Found

The requested resource resides temporarily under a different URI.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{tenant_id}

String

The ID of the tenant. A tenant is also known as an account or project.

stack_name

String (Required)

The name of a stack.

This operation does not accept a request body.

Response#

Example Find stack resources: JSON response

Lists resources for the specified stack in JSON format.

List resources#

GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/resources

Lists resources in a stack.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request could not be understood by the server due to malformed syntax.

401

Unauthorized

The request requires user authentication.

404

Not Found

The server has not found anything matching the Request-URI.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{tenant_id}

String

The ID of the tenant. A tenant is also known as an account or project.

stack_name

String (Required)

The name of a stack.

{stack_id}

String (Required)

The stack ID.

This table shows the query parameters for the request:

Name

Type

Description

nested_depth

String (Optional)

Includes resources from nested stacks up to the nested_depth levels of recursion.

with_detail

String (Optional)

Enables detailed resource information for each resource in list of resources.

This operation does not accept a request body.

Response#

Example List resources: JSON response

Lists resources in the specified stack in JSON format.

{
    "resources": [
        {
            "creation_time": "2015-06-25T14:59:53",
            "links": [
                {
                    "href": "http://hostname/v1/1234/stacks/mystack/629a32d0-ac4f-4f63-b58d-f0d047b1ba4c/resources/random_key_name",
                    "rel": "self"
                },
                {
                    "href": "http://hostname/v1/1234/stacks/mystack/629a32d0-ac4f-4f63-b58d-f0d047b1ba4c",
                    "rel": "stack"
                }
            ],
            "logical_resource_id": "random_key_name",
            "physical_resource_id": "mystack-random_key_name-pmjmy5pks735",
            "required_by": [],
            "resource_name": "random_key_name",
            "resource_status": "CREATE_COMPLETE",
            "resource_status_reason": "state changed",
            "resource_type": "OS::Heat::RandomString",
            "updated_time": "2015-06-25T14:59:53"
        }
    ]
}

Show resource data#

GET /v1/{tenant_id}/stacks/{stack_name}/{stack_id}/resources/{resource_name}

Shows data for a specified resource.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request could not be understood by the server due to malformed syntax.

401

Unauthorized

The request requires user authentication.

404

Not Found

The server has not found anything matching the Request-URI.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{tenant_id}

String

The ID of the tenant. A tenant is also known as an account or project.

stack_name

String (Required)

The name of a stack.

{stack_id}

String (Required)

The stack ID.

{resource_name}

String (Required)

The name of a resource in the stack.

This operation does not accept a request body.

Response#

Example Show resource data: JSON response

Shows resource data for the specified resource in JSON format.

{
    "resource": {
        "attributes": {
            "value": "I9S20uIp"
        },
        "creation_time": "2015-06-25T14:59:53",
        "description": "",
        "links": [
            {
                "href": "http://hostname/v1/1234/stacks/mystack/629a32d0-ac4f-4f63-b58d-f0d047b1ba4c/resources/random_key_name",
                "rel": "self"
            },
            {
                "href": "http://hostname/v1/1234/stacks/mystack/629a32d0-ac4f-4f63-b58d-f0d047b1ba4c",
                "rel": "stack"
            }
        ],
        "logical_resource_id": "random_key_name",
        "physical_resource_id": "mystack-random_key_name-pmjmy5pks735",
        "required_by": [],
        "resource_name": "random_key_name",
        "resource_status": "CREATE_COMPLETE",
        "resource_status_reason": "state changed",
        "resource_type": "OS::Heat::RandomString",
        "updated_time": "2015-06-25T14:59:53"
    }
}

List resource types#

GET /v1/{tenant_id}/resource_types

Lists the supported template resource types.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request could not be understood by the server due to malformed syntax.

401

Unauthorized

The request requires user authentication.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{tenant_id}

String

The ID of the tenant. A tenant is also known as an account or project.

This operation does not accept a request body.

Response#

Example List resource types: JSON response

{
    "resource_types": [
        "AWS::EC2::Instance",
        "OS::Heat::ScalingPolicy",
        "AWS::CloudFormation::Stack",
        "OS::Keystone::Group",
        "OS::Glance::Image",
        "AWS::EC2::Volume",
        "OS::Heat::SoftwareDeployment",
        "AWS::AutoScaling::ScalingPolicy",
        "AWS::EC2::InternetGateway",
        "OS::Heat::SoftwareDeployments",
        "AWS::EC2::VolumeAttachment",
        "AWS::CloudFormation::WaitConditionHandle",
        "OS::Cinder::VolumeAttachment",
        "OS::Cinder::EncryptedVolumeType",
        "OS::Heat::AutoScalingGroup",
        "OS::Nova::FloatingIP",
        "OS::Heat::HARestarter",
        "OS::Keystone::Project",
        "OS::Keystone::Endpoint",
        "OS::Heat::InstanceGroup",
        "AWS::CloudWatch::Alarm",
        "AWS::AutoScaling::AutoScalingGroup",
        "OS::Heat::CloudConfig",
        "OS::Heat::SoftwareComponent",
        "OS::Cinder::Volume",
        "OS::Keystone::Service",
        "OS::Heat::WaitConditionHandle",
        "OS::Heat::SoftwareConfig",
        "AWS::CloudFormation::WaitCondition",
        "OS::Heat::StructuredDeploymentGroup",
        "OS::Heat::RandomString",
        "OS::Heat::SoftwareDeploymentGroup",
        "OS::Nova::KeyPair",
        "OS::Heat::MultipartMime",
        "OS::Heat::UpdateWaitConditionHandle",
        "OS::Nova::Server",
        "AWS::IAM::AccessKey",
        "AWS::EC2::SecurityGroup",
        "AWS::EC2::EIPAssociation",
        "AWS::EC2::EIP",
        "OS::Heat::AccessPolicy",
        "AWS::IAM::User",
        "OS::Heat::WaitCondition",
        "OS::Heat::StructuredDeployment",
        "AWS::RDS::DBInstance",
        "AWS::AutoScaling::LaunchConfiguration",
        "OS::Heat::Stack",
        "OS::Nova::FloatingIPAssociation",
        "OS::Heat::ResourceGroup",
        "OS::Heat::StructuredConfig",
        "OS::Nova::ServerGroup",
        "OS::Heat::StructuredDeployments",
        "OS::Keystone::Role",
        "OS::Keystone::User",
        "AWS::ElasticLoadBalancing::LoadBalancer",
        "OS::Nova::Flavor",
        "OS::Cinder::VolumeType"
    ]
}

Show resource schema#

GET /v1/{tenant_id}/resource_types/{type_name}

Shows the interface schema for a specified resource type. This schema describes the properties that can be set on the resource, their types, constraints, descriptions, and default values. Additionally, the resource attributes and their descriptions are provided.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request could not be understood by the server due to malformed syntax.

401

Unauthorized

The request requires user authentication.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{tenant_id}

String

The ID of the tenant. A tenant is also known as an account or project.

{type_name}

String (Required)

The name of a resource type.

This operation does not accept a request body.

Response#

Example Show resource schema: JSON response

{
    "attributes": {
        "an_attribute": {
            "description": "A runtime value of the resource."
        }
    },
    "properties": {
        "a_property": {
            "constraints": [
                {
                    "description": "Must be between 1 and 255 characters",
                    "length": {
                        "max": 255,
                        "min": 1
                    }
                }
            ],
            "description": "A resource description.",
            "required": true,
            "type": "string",
            "update_allowed": false
        }
    },
    "resource_type": "OS::Heat::AResourceName",
    "support_status": {
        "message": "A status message",
        "status": "SUPPORTED",
        "version": "2014.1"
    }
}

Show resource template#

GET /v1/{tenant_id}/resource_types/{type_name}/template

Shows the template representation for a specified resource type.

The returned template contains a single resource of the specified type. Each resource property is mapped to a template parameter and each resource attribute is mapped to a template output.

You can use these templates as a starting place for creating customized, template-based resources or as examples of using the particular resource in another template.

Use the template_type query parameter to specify the resource template type. Default type is cfn. The hot template type is supported. For example:

/v1/{tenant_id}/resource_types/{type_name}/template?template_type=cfn

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Bad Request

The request could not be understood by the server due to malformed syntax.

401

Unauthorized

The request requires user authentication.

404

Not Found

The server has not found anything matching the Request-URI.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{tenant_id}

String

The ID of the tenant. A tenant is also known as an account or project.

{type_name}

String (Required)

The name of a resource type.

template_type

String (Optional)

The resource template type. Default type is cfn. The hot template type is supported.

This operation does not accept a request body.

Response#

Example Show resource template: JSON response

{
    "HeatTemplateFormatVersion": "2012-12-12",
    "Outputs": {
        "private_key": {
            "Description": "The private key if it has been saved.",
            "Value": "{\"Fn::GetAtt\": [\"KeyPair\", \"private_key\"]}"
        },
        "public_key": {
            "Description": "The public key.",
            "Value": "{\"Fn::GetAtt\": [\"KeyPair\", \"public_key\"]}"
        }
    },
    "Parameters": {
        "name": {
            "Description": "The name of the key pair.",
            "Type": "String"
        },
        "public_key": {
            "Description": "The optional public key. This allows users to supply the public key from a pre-existing key pair. If not supplied, a new key pair will be generated.",
            "Type": "String"
        },
        "save_private_key": {
            "AllowedValues": [
                "True",
                "true",
                "False",
                "false"
            ],
            "Default": false,
            "Description": "True if the system should remember a generated private key; False otherwise.",
            "Type": "String"
        }
    },
    "Resources": {
        "KeyPair": {
            "Properties": {
                "name": {
                    "Ref": "name"
                },
                "public_key": {
                    "Ref": "public_key"
                },
                "save_private_key": {
                    "Ref": "save_private_key"
                }
            },
            "Type": "OS::Nova::KeyPair"
        }
    }
}