cm16

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2015 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Used by rsc to display command line help
	ApiName = "RightScale CM API 1.6"
)

Variables

View Source
var GenMetadata = map[string]*metadata.Resource{
	"Account": &metadata.Resource{
		Name: "Account",
		Description: `        Resources in RightScale generally belong to accounts. Users can have
        any number of accounts, but when performing an action, a user is
        operating under a particular account.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/accounts",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/accounts`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/accounts/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/accounts/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"Cloud": &metadata.Resource{
		Name: "Cloud",
		Description: `        Clouds provide remote resources for things like storage and compute.
        You must have registered a cloud within your account in order to use
        it.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/clouds`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"Datacenter": &metadata.Resource{
		Name: "Datacenter",
		Description: `        Datacenters are cloud resources that give you the ability to place
        resources in isolated locations. A carefully designed system placed in
        multiple datacenters can provide fault tolerance when one datacenter
        has a problem.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/datacenters",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/datacenters`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/datacenters",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/datacenters`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/datacenters/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/datacenters/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/datacenters/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/datacenters/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"Deployment": &metadata.Resource{
		Name: "Deployment",
		Description: `        Deployments provide a way to group resources that logically belong
        together.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `          List all Deployments in an Account.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/deployments",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/deployments`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "ids",
						Description: `Comma separated list of Deployment IDs`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "link"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "ids",
						Description: `Comma separated list of Deployment IDs`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "link"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Show a single Deployment`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/deployments/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/deployments/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "link"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "link"},
					},
				},
			},
		},
	},
	"Image": &metadata.Resource{
		Name: "Image",
		Description: `        Images define the initial Operating System and root disk contents
        for new instances.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `Lists all Images for the given Cloud.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/images",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/images`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name: "filter",
						Description: `              Filter images by attribute. A filter takes the form <attribute><operator><value>.
              <operator> can be either "=" or "!=". <value> can be comma-separated list of values to
              express multiple possible values. For example, "image_type=machine,ramdisk" finds all
              images that have "machine" and "ramdisk" types. Multiple filters must be concatenated with an
              ampersand (&). For example, "image_type=machine&visibility=private" finds all images with
              type "machine" and visibility "private". All special characters in the filter must be
              URL encoded.`,
						Type:      "string",
						Location:  metadata.QueryParam,
						Mandatory: false,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name: "filter",
						Description: `              Filter images by attribute. A filter takes the form <attribute><operator><value>.
              <operator> can be either "=" or "!=". <value> can be comma-separated list of values to
              express multiple possible values. For example, "image_type=machine,ramdisk" finds all
              images that have "machine" and "ramdisk" types. Multiple filters must be concatenated with an
              ampersand (&). For example, "image_type=machine&visibility=private" finds all images with
              type "machine" and visibility "private". All special characters in the filter must be
              URL encoded.`,
						Type:      "string",
						Location:  metadata.QueryParam,
						Mandatory: false,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/images/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/images/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/images/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/images/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"Instance": &metadata.Resource{
		Name: "Instance",
		Description: `        Instances represent an entity that is runnable in the cloud.
        An instance of type "next" is a container of information that expresses
        how to configure a future instance when we decide to launch or start
        it. A "next" instance generally only exists in the RightScale realm,
        and usually doesn't have any corresponding representation existing in
        the cloud. However, if an instance is not of type "next", it will
        generally represent an existing running (or provisioned) virtual
        machine existing in the cloud.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `          List all Instances in an account.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/instances",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/instances`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/instances",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/instances`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name: "filter",
						Description: `              Filter instances by attribute. A filter takes the form <attribute><operator><value>.
              <operator> can be either "=" or "!=". <value> can be comma-separated list of values to
              express multiple possible values. For example, "state=booting,operational" finds all
              instances that are in "booting" or "operational" state. Percentage (%) wildcard character
              can be used to perform partial string match if supported by the filter. For example,
              "name=%test%" finds all instances with name containing the word "test",
              "name=test%" finds all instances with name beginning with "test", and "name=%test" finds
              all instances with name ending with "test". Multiple filters must be concatenated with an
              ampersand (&). For example, "name=test&state=operational" finds all instances with
              name "test" and are in "operational" state. All special characters in the filter must be
              URL encoded.`,
						Type:      "string",
						Location:  metadata.QueryParam,
						Mandatory: false,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name:        "ids",
						Description: `Comma separated list of Instance RsIds`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "limit",
						Description: `The maximum number of resources to return for this index`,
						Type:        "int",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "tiny", "link"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name: "filter",
						Description: `              Filter instances by attribute. A filter takes the form <attribute><operator><value>.
              <operator> can be either "=" or "!=". <value> can be comma-separated list of values to
              express multiple possible values. For example, "state=booting,operational" finds all
              instances that are in "booting" or "operational" state. Percentage (%) wildcard character
              can be used to perform partial string match if supported by the filter. For example,
              "name=%test%" finds all instances with name containing the word "test",
              "name=test%" finds all instances with name beginning with "test", and "name=%test" finds
              all instances with name ending with "test". Multiple filters must be concatenated with an
              ampersand (&). For example, "name=test&state=operational" finds all instances with
              name "test" and are in "operational" state. All special characters in the filter must be
              URL encoded.`,
						Type:      "string",
						Location:  metadata.QueryParam,
						Mandatory: false,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name:        "ids",
						Description: `Comma separated list of Instance RsIds`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "limit",
						Description: `The maximum number of resources to return for this index`,
						Type:        "int",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "tiny", "link"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/instances/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/instances/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/instances/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/instances/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "tiny"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full", "tiny"},
					},
				},
			},
		},
	},
	"InstanceType": &metadata.Resource{
		Name: "InstanceType",
		Description: `        An InstanceType represents a basic hardware configuration for an
        Instance.
        Combining all possible configurations of hardware into a smaller,
        well-known set of options makes instances easier to manage, and allows
        better allocation efficiency into physical hosts.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/instance_types",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/instance_types`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/instance_types",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/instance_types`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/instance_types/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/instance_types/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/instance_types/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/instance_types/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"IpAddress": &metadata.Resource{
		Name: "IpAddress",
		Description: `        An IpAddress provides an abstraction for IPv4 addresses bindable to
        Instance resources running in a Cloud.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/ip_addresses",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/ip_addresses`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/ip_addresses",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/ip_addresses`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/ip_addresses/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/ip_addresses/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/ip_addresses/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/ip_addresses/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"IpAddressBinding": &metadata.Resource{
		Name: "IpAddressBinding",
		Description: `        An IpAddressBinding represents an abstraction for binding an IpAddress
        to an instance. The IpAddress is bound immediately for a current
        instance, or on launch for a next instance.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/ip_address_bindings",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/ip_address_bindings`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/ip_address_bindings",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/ip_address_bindings`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/ip_address_bindings/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/ip_address_bindings/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/ip_address_bindings/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/ip_address_bindings/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"MultiCloudImage": &metadata.Resource{
		Name: "MultiCloudImage",
		Description: `        A MultiCloudImage is a RightScale component that functions as a pointer
        to machine images in specific clouds (e.g. AWS US-East, Rackspace).
        Each ServerTemplate can reference many MultiCloudImages that define
        which image should be used when a server is launched in a particular
        cloud.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/multi_cloud_images",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/multi_cloud_images`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/multi_cloud_images/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/multi_cloud_images/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"Network": &metadata.Resource{
		Name:        "Network",
		Description: `        A Network is a logical grouping of network devices.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/networks",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/networks`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/networks/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/networks/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"NetworkInterface": &metadata.Resource{
		Name: "NetworkInterface",
		Description: `        Just like their physical counterparts, NetworkInterfaces join other
        resources to a network.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/network_interfaces",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/network_interfaces`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/network_interfaces/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/network_interfaces/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"NetworkInterfaceAttachment": &metadata.Resource{
		Name: "NetworkInterfaceAttachment",
		Description: `        NetworkInterfaceAttachments represent an attachment between a
        NetworkInterface and another resource.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/network_interface_attachments",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/network_interface_attachments`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/network_interface_attachments/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/network_interface_attachments/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"SecurityGroup": &metadata.Resource{
		Name: "SecurityGroup",
		Description: `        Security Groups represent network security profiles that contain lists
        of firewall rules for different ports and source IP addresses, as well
        as trust relationships between security groups.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/security_groups",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/security_groups`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/security_groups",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/security_groups`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/instances/%s/security_groups",
						Variables:  []string{"cloud_id", "instance_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/instances/([^/]+)/security_groups`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/security_groups/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/security_groups/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/security_groups/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/security_groups/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"Server": &metadata.Resource{
		Name: "Server",
		Description: `        Servers represent the notion of a server/machine from RightScale's
        perspective. A Server, does not always have a corresponding VM running
        or provisioned in a cloud. Some clouds use the word "servers" to refer
        to created VMs. These allocated VMs are not called Servers in the
        RightScale API, they are called Instances.
        A Server always has a next_instance association, which will define the
        configuration to apply to a new instance when the server is launched or
        started (starting servers is not yet supported through this API). Once
        a Server is launched/started, a current_instance relationship will
        exist.  Accessing the current_instance of a server results in immediate
        runtime modification of this running server. Changes to the
        next_instance association prepares the configuration for the next
        instance launch/start (therefore they have no effect until such
        operation is performed).`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/servers",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/servers`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/servers/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/servers/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
			},
		},
	},
	"ServerArray": &metadata.Resource{
		Name: "ServerArray",
		Description: `        A server array represents a logical group of instances and allows to
        resize(grow/shrink) that group based on certain elasticity parameters.
        A server array just like a server always has a next_instance
        association, which will define the configuration to apply when a new
        instance is launched. But unlike a server which has a current_instance
        relationship, the server array has a current_instances relationship
        that gives the information about all the running instances in the
        array.  Changes to the next_instance association prepares the
        configuration for the next instance that is to be launched in the array
        and will therefore not affect any of the currently running instances.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/server_arrays",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/server_arrays`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/server_arrays/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/server_arrays/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "extended", "full"},
					},
				},
			},
		},
	},
	"ServerTemplate": &metadata.Resource{
		Name: "ServerTemplate",
		Description: `        ServerTemplates allow you to pre-configure servers by starting from a
        base image and adding scripts that run during the boot, operational,
        and shutdown phases. A ServerTemplate is a description of how a new
        instance will be configured when it is provisioned by your cloud
        provider.
        All revisions of a ServerTemplate belong to a ServerTemplate lineage
        that is exposed by the "lineage" attribute. (NOTE: This attribute is
        merely a string to locate all revisions of a ServerTemplate and NOT a
        working URL)`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/server_templates",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/server_templates`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "embedded"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "embedded"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/server_templates/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/server_templates/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "embedded"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "embedded"},
					},
				},
			},
		},
	},
	"SshKey": &metadata.Resource{
		Name:        "SshKey",
		Description: `        Ssh Keys represent a created SSH Key that exists in the cloud.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/ssh_keys",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/ssh_keys`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/ssh_keys",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/ssh_keys`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/ssh_keys/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/ssh_keys/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/ssh_keys/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/ssh_keys/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
	"Subnet": &metadata.Resource{
		Name: "Subnet",
		Description: `        A Subnet is a logical grouping of network devices. An Instance can have
        many Subnets.`,
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/subnets",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/api/subnets`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/subnets",
						Variables:  []string{"cloud_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/subnets`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/instances/%s/subnets",
						Variables:  []string{"cloud_id", "instance_id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/instances/([^/]+)/subnets`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `      Currently not implemented.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/subnets/%s",
						Variables:  []string{"id"},
						Regexp:     regexp.MustCompile(`/api/subnets/([^/]+)`),
					},
					&metadata.PathPattern{
						HttpMethod: "GET",
						Pattern:    "/api/clouds/%s/subnets/%s",
						Variables:  []string{"cloud_id", "id"},
						Regexp:     regexp.MustCompile(`/api/clouds/([^/]+)/subnets/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
				ApiParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `The view to use to render this resource`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default"},
					},
				},
			},
		},
	},
}

Consists of a map of resource name to resource metadata.

Functions

func RegisterCommands

func RegisterCommands(registrar *rsapi.Registrar)

Register all commands with kinpin application

Types

type Account

type Account struct {
	Href string `json:"href,omitempty"`
	Id   int    `json:"id,omitempty"`
	Kind string `json:"kind,omitempty"`
	Name string `json:"name,omitempty"`
}

Resources in RightScale generally belong to accounts. Users can have any number of accounts, but when performing an action, a user is operating under a particular account.

type AccountLocator

type AccountLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Account resource locator, exposes resource actions.

func (*AccountLocator) Index

func (loc *AccountLocator) Index(options rsapi.ApiParams) error

GET /api/accounts

Currently not implemented.

func (*AccountLocator) Show

func (loc *AccountLocator) Show(options rsapi.ApiParams) error

GET /api/accounts/:id

Currently not implemented.

type AccountParam

type AccountParam struct {
	Href string `json:"href,omitempty"`
	Id   int    `json:"id,omitempty"`
	Kind string `json:"kind,omitempty"`
	Name string `json:"name,omitempty"`
}

type Api

type Api struct {
	*rsapi.Api
}

Api 1.6 client Just a vanilla RightScale API client.

func FromCommandLine

func FromCommandLine(cmdLine *cmd.CommandLine) (*Api, error)

Build client from command line

func New

func New(accountId int, host string, auth rsapi.Authenticator, logger *log.Logger,
	client rsapi.HttpClient) (*Api, error)

New returns a API 1.6 client that uses User oauth authentication. logger and client are optional. host may be blank in which case client attempts to resolve it using auth. If no HTTP client is specified then the default client is used.

func NewRL10

func NewRL10(logger *log.Logger, client rsapi.HttpClient) (*Api, error)

NewRL10 returns a API 1.6 client that uses the information stored in /var/run/rightlink/secret to do auth and configure the host. The client behaves identically to the new returned by New in all other regards.

func (*Api) AccountLocator

func (api *Api) AccountLocator(href string) *AccountLocator

Account resource locator factory

func (*Api) BuildRequest

func (a *Api) BuildRequest(resource, action, href string, params rsapi.ApiParams) (*http.Request, error)

BuildRequest builds a HTTP request from a resource name and href and an action name and parameters. It is intended for generic clients that need to consume APIs in a generic maner. The method builds an HTTP request that can be fed to PerformRequest.

func (*Api) CloudLocator

func (api *Api) CloudLocator(href string) *CloudLocator

Cloud resource locator factory

func (*Api) DatacenterLocator

func (api *Api) DatacenterLocator(href string) *DatacenterLocator

Datacenter resource locator factory

func (*Api) DeploymentLocator

func (api *Api) DeploymentLocator(href string) *DeploymentLocator

Deployment resource locator factory

func (*Api) Dispatch

func (a *Api) Dispatch(verb, uri string, params, payload rsapi.ApiParams) (*http.Response, error)

Helper function that signs, makes and logs HTTP request

func (*Api) ImageLocator

func (api *Api) ImageLocator(href string) *ImageLocator

Image resource locator factory

func (*Api) InstanceLocator

func (api *Api) InstanceLocator(href string) *InstanceLocator

Instance resource locator factory

func (*Api) InstanceTypeLocator

func (api *Api) InstanceTypeLocator(href string) *InstanceTypeLocator

InstanceType resource locator factory

func (*Api) IpAddressBindingLocator

func (api *Api) IpAddressBindingLocator(href string) *IpAddressBindingLocator

IpAddressBinding resource locator factory

func (*Api) IpAddressLocator

func (api *Api) IpAddressLocator(href string) *IpAddressLocator

IpAddress resource locator factory

func (*Api) MultiCloudImageLocator

func (api *Api) MultiCloudImageLocator(href string) *MultiCloudImageLocator

MultiCloudImage resource locator factory

func (*Api) NetworkInterfaceAttachmentLocator

func (api *Api) NetworkInterfaceAttachmentLocator(href string) *NetworkInterfaceAttachmentLocator

NetworkInterfaceAttachment resource locator factory

func (*Api) NetworkInterfaceLocator

func (api *Api) NetworkInterfaceLocator(href string) *NetworkInterfaceLocator

NetworkInterface resource locator factory

func (*Api) NetworkLocator

func (api *Api) NetworkLocator(href string) *NetworkLocator

Network resource locator factory

func (*Api) RunCommand

func (a *Api) RunCommand(cmd string) (*http.Response, error)

Parse and run command

func (*Api) SecurityGroupLocator

func (api *Api) SecurityGroupLocator(href string) *SecurityGroupLocator

SecurityGroup resource locator factory

func (*Api) ServerArrayLocator

func (api *Api) ServerArrayLocator(href string) *ServerArrayLocator

ServerArray resource locator factory

func (*Api) ServerLocator

func (api *Api) ServerLocator(href string) *ServerLocator

Server resource locator factory

func (*Api) ServerTemplateLocator

func (api *Api) ServerTemplateLocator(href string) *ServerTemplateLocator

ServerTemplate resource locator factory

func (*Api) ShowApiActions

func (a *Api) ShowApiActions(cmd string) error

Show command hrefs

func (*Api) ShowCommandHelp

func (a *Api) ShowCommandHelp(cmd string) error

Show command help

func (*Api) SshKeyLocator

func (api *Api) SshKeyLocator(href string) *SshKeyLocator

SshKey resource locator factory

func (*Api) SubnetLocator

func (api *Api) SubnetLocator(href string) *SubnetLocator

Subnet resource locator factory

type Cloud

type Cloud struct {
	CloudType   string `json:"cloud_type,omitempty"`
	Description string `json:"description,omitempty"`
	Href        string `json:"href,omitempty"`
	Id          int    `json:"id,omitempty"`
	Kind        string `json:"kind,omitempty"`
	Name        string `json:"name,omitempty"`
}

Clouds provide remote resources for things like storage and compute. You must have registered a cloud within your account in order to use it.

type CloudLocator

type CloudLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Cloud resource locator, exposes resource actions.

func (*CloudLocator) Index

func (loc *CloudLocator) Index(options rsapi.ApiParams) error

GET /api/clouds

Currently not implemented.

func (*CloudLocator) Show

func (loc *CloudLocator) Show(options rsapi.ApiParams) error

GET /api/clouds/:id

Currently not implemented.

type CloudParam

type CloudParam struct {
	CloudType   string `json:"cloud_type,omitempty"`
	Description string `json:"description,omitempty"`
	Href        string `json:"href,omitempty"`
	Id          int    `json:"id,omitempty"`
	Kind        string `json:"kind,omitempty"`
	Name        string `json:"name,omitempty"`
}

type Datacenter

type Datacenter struct {
	Description string           `json:"description,omitempty"`
	Href        string           `json:"href,omitempty"`
	Id          string           `json:"id,omitempty"`
	Kind        string           `json:"kind,omitempty"`
	LegacyId    int              `json:"legacy_id,omitempty"`
	Links       *DatacenterLinks `json:"links,omitempty"`
	Name        string           `json:"name,omitempty"`
}

Datacenters are cloud resources that give you the ability to place resources in isolated locations. A carefully designed system placed in multiple datacenters can provide fault tolerance when one datacenter has a problem.

type DatacenterLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type DatacenterLocator

type DatacenterLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Datacenter resource locator, exposes resource actions.

func (*DatacenterLocator) Index

func (loc *DatacenterLocator) Index(options rsapi.ApiParams) error

GET /api/datacenters GET /api/clouds/:cloud_id/datacenters

Currently not implemented.

func (*DatacenterLocator) Show

func (loc *DatacenterLocator) Show(options rsapi.ApiParams) error

GET /api/datacenters/:id GET /api/clouds/:cloud_id/datacenters/:id

Currently not implemented.

type DatacenterParam

type DatacenterParam struct {
	Description string           `json:"description,omitempty"`
	Href        string           `json:"href,omitempty"`
	Id          string           `json:"id,omitempty"`
	Kind        string           `json:"kind,omitempty"`
	LegacyId    int              `json:"legacy_id,omitempty"`
	Links       *DatacenterLinks `json:"links,omitempty"`
	Name        string           `json:"name,omitempty"`
}

type Deployment

type Deployment struct {
	Description  string           `json:"description,omitempty"`
	Href         string           `json:"href,omitempty"`
	Id           int              `json:"id,omitempty"`
	Instances    []*Instance      `json:"instances,omitempty"`
	Kind         string           `json:"kind,omitempty"`
	Links        *DeploymentLinks `json:"links,omitempty"`
	Locked       bool             `json:"locked,omitempty"`
	Name         string           `json:"name,omitempty"`
	ServerArrays []*ServerArray   `json:"server_arrays,omitempty"`
	Servers      []*Server        `json:"servers,omitempty"`
	Tags         []string         `json:"tags,omitempty"`
}

Deployments provide a way to group resources that logically belong together.

type DeploymentLinks struct {
	Account *AccountParam `json:"account,omitempty"`
}

type DeploymentLocator

type DeploymentLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Deployment resource locator, exposes resource actions.

func (*DeploymentLocator) Index

func (loc *DeploymentLocator) Index(options rsapi.ApiParams) (*Deployment, error)

GET /api/deployments

List all Deployments in an Account.

func (*DeploymentLocator) Show

func (loc *DeploymentLocator) Show(options rsapi.ApiParams) (*Deployment, error)

GET /api/deployments/:id

Show a single Deployment

type DeploymentParam

type DeploymentParam struct {
	Description  string              `json:"description,omitempty"`
	Href         string              `json:"href,omitempty"`
	Id           int                 `json:"id,omitempty"`
	Instances    []*InstanceParam    `json:"instances,omitempty"`
	Kind         string              `json:"kind,omitempty"`
	Links        *DeploymentLinks    `json:"links,omitempty"`
	Locked       bool                `json:"locked,omitempty"`
	Name         string              `json:"name,omitempty"`
	ServerArrays []*ServerArrayParam `json:"server_arrays,omitempty"`
	Servers      []*ServerParam      `json:"servers,omitempty"`
	Tags         []string            `json:"tags,omitempty"`
}

type Image

type Image struct {
	CpuArchitecture    string      `json:"cpu_architecture,omitempty"`
	Description        string      `json:"description,omitempty"`
	Href               string      `json:"href,omitempty"`
	Id                 string      `json:"id,omitempty"`
	ImageType          string      `json:"image_type,omitempty"`
	InheritedSource    string      `json:"inherited_source,omitempty"`
	Kind               string      `json:"kind,omitempty"`
	LegacyId           int         `json:"legacy_id,omitempty"`
	Links              *ImageLinks `json:"links,omitempty"`
	Name               string      `json:"name,omitempty"`
	OsPlatform         string      `json:"os_platform,omitempty"`
	ResourceUid        string      `json:"resource_uid,omitempty"`
	RootDeviceStorage  string      `json:"root_device_storage,omitempty"`
	VirtualizationType string      `json:"virtualization_type,omitempty"`
	Visibility         string      `json:"visibility,omitempty"`
}

Images define the initial Operating System and root disk contents for new instances.

type ImageLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type ImageLocator

type ImageLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Image resource locator, exposes resource actions.

func (*ImageLocator) Index

func (loc *ImageLocator) Index(options rsapi.ApiParams) (*Image, error)

GET /api/clouds/:cloud_id/images

Lists all Images for the given Cloud.

func (*ImageLocator) Show

func (loc *ImageLocator) Show(options rsapi.ApiParams) error

GET /api/images/:id GET /api/clouds/:cloud_id/images/:id

Currently not implemented.

type ImageParam

type ImageParam struct {
	CpuArchitecture    string      `json:"cpu_architecture,omitempty"`
	Description        string      `json:"description,omitempty"`
	Href               string      `json:"href,omitempty"`
	Id                 string      `json:"id,omitempty"`
	ImageType          string      `json:"image_type,omitempty"`
	InheritedSource    string      `json:"inherited_source,omitempty"`
	Kind               string      `json:"kind,omitempty"`
	LegacyId           int         `json:"legacy_id,omitempty"`
	Links              *ImageLinks `json:"links,omitempty"`
	Name               string      `json:"name,omitempty"`
	OsPlatform         string      `json:"os_platform,omitempty"`
	ResourceUid        string      `json:"resource_uid,omitempty"`
	RootDeviceStorage  string      `json:"root_device_storage,omitempty"`
	VirtualizationType string      `json:"virtualization_type,omitempty"`
	Visibility         string      `json:"visibility,omitempty"`
}

type Incarnator

type Incarnator struct {
	Href  string `json:"href,omitempty"`
	Id    int    `json:"id,omitempty"`
	Kind  string `json:"kind,omitempty"`
	Name  string `json:"name,omitempty"`
	State string `json:"state,omitempty"`
}

type Instance

type Instance struct {
	Actions            []string                 `json:"actions,omitempty"`
	Description        string                   `json:"description,omitempty"`
	Href               string                   `json:"href,omitempty"`
	Id                 string                   `json:"id,omitempty"`
	IpAddresses        []*IpAddress             `json:"ip_addresses,omitempty"`
	IsNext             bool                     `json:"is_next,omitempty"`
	Kind               string                   `json:"kind,omitempty"`
	LegacyId           int                      `json:"legacy_id,omitempty"`
	Links              *InstanceLinks           `json:"links,omitempty"`
	Locked             bool                     `json:"locked,omitempty"`
	MonitoringId       string                   `json:"monitoring_id,omitempty"`
	MonitoringServer   string                   `json:"monitoring_server,omitempty"`
	MonitoringToken    string                   `json:"monitoring_token,omitempty"`
	Name               string                   `json:"name,omitempty"`
	Networks           []*Network               `json:"networks,omitempty"`
	OsPlatform         string                   `json:"os_platform,omitempty"`
	PrivateDnsNames    []string                 `json:"private_dns_names,omitempty"`
	PrivateIpAddresses []string                 `json:"private_ip_addresses,omitempty"`
	PublicDnsNames     []string                 `json:"public_dns_names,omitempty"`
	PublicIpAddresses  []string                 `json:"public_ip_addresses,omitempty"`
	ResourceUid        string                   `json:"resource_uid,omitempty"`
	SecurityGroups     *SecurityGroupCollection `json:"security_groups,omitempty"`
	ServerTemplate     *ServerTemplate          `json:"server_template,omitempty"`
	SshHost            string                   `json:"ssh_host,omitempty"`
	State              string                   `json:"state,omitempty"`
	Subnets            *SubnetCollection        `json:"subnets,omitempty"`
	Tags               []string                 `json:"tags,omitempty"`
	Timestamps         *TimestampsStruct        `json:"timestamps,omitempty"`
}

Instances represent an entity that is runnable in the cloud. An instance of type "next" is a container of information that expresses how to configure a future instance when we decide to launch or start it. A "next" instance generally only exists in the RightScale realm, and usually doesn't have any corresponding representation existing in the cloud. However, if an instance is not of type "next", it will generally represent an existing running (or provisioned) virtual machine existing in the cloud.

type InstanceLinks struct {
	Account                 *AccountParam            `json:"account,omitempty"`
	Cloud                   *CloudParam              `json:"cloud,omitempty"`
	ComputedImage           *ImageParam              `json:"computed_image,omitempty"`
	ComputedMultiCloudImage *MultiCloudImageParam    `json:"computed_multi_cloud_image,omitempty"`
	Datacenter              *DatacenterParam         `json:"datacenter,omitempty"`
	Deployment              *DeploymentParam         `json:"deployment,omitempty"`
	Image                   *ImageParam              `json:"image,omitempty"`
	Incarnator              *Incarnator              `json:"incarnator,omitempty"`
	InstanceType            *InstanceTypeParam       `json:"instance_type,omitempty"`
	MultiCloudImage         *MultiCloudImageParam    `json:"multi_cloud_image,omitempty"`
	SecurityGroups          *SecurityGroupCollection `json:"security_groups,omitempty"`
	SshKey                  *SshKeyParam             `json:"ssh_key,omitempty"`
	Subnets                 *SubnetCollection        `json:"subnets,omitempty"`
}

type InstanceLocator

type InstanceLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Instance resource locator, exposes resource actions.

func (*InstanceLocator) Index

func (loc *InstanceLocator) Index(options rsapi.ApiParams) (*Instance, error)

GET /api/instances GET /api/clouds/:cloud_id/instances

List all Instances in an account.

func (*InstanceLocator) Show

func (loc *InstanceLocator) Show(options rsapi.ApiParams) error

GET /api/instances/:id GET /api/clouds/:cloud_id/instances/:id

Currently not implemented.

type InstanceParam

type InstanceParam struct {
	Actions            []string                   `json:"actions,omitempty"`
	Description        string                     `json:"description,omitempty"`
	Href               string                     `json:"href,omitempty"`
	Id                 string                     `json:"id,omitempty"`
	IpAddresses        []*IpAddressParam          `json:"ip_addresses,omitempty"`
	IsNext             bool                       `json:"is_next,omitempty"`
	Kind               string                     `json:"kind,omitempty"`
	LegacyId           int                        `json:"legacy_id,omitempty"`
	Links              *InstanceLinks             `json:"links,omitempty"`
	Locked             bool                       `json:"locked,omitempty"`
	MonitoringId       string                     `json:"monitoring_id,omitempty"`
	MonitoringServer   string                     `json:"monitoring_server,omitempty"`
	MonitoringToken    string                     `json:"monitoring_token,omitempty"`
	Name               string                     `json:"name,omitempty"`
	Networks           []*NetworkParam            `json:"networks,omitempty"`
	OsPlatform         string                     `json:"os_platform,omitempty"`
	PrivateDnsNames    []string                   `json:"private_dns_names,omitempty"`
	PrivateIpAddresses []string                   `json:"private_ip_addresses,omitempty"`
	PublicDnsNames     []string                   `json:"public_dns_names,omitempty"`
	PublicIpAddresses  []string                   `json:"public_ip_addresses,omitempty"`
	ResourceUid        string                     `json:"resource_uid,omitempty"`
	SecurityGroups     *SecurityGroupCollection   `json:"security_groups,omitempty"`
	ServerTemplate     *ServerTemplateParam       `json:"server_template,omitempty"`
	SshHost            string                     `json:"ssh_host,omitempty"`
	State              string                     `json:"state,omitempty"`
	Subnets            *SubnetCollection          `json:"subnets,omitempty"`
	Tags               []string                   `json:"tags,omitempty"`
	Timestamps         *InstancesTimestampsStruct `json:"timestamps,omitempty"`
}

type InstanceSummaryStruct

type InstanceSummaryStruct struct {
	HealthyCount       int `json:"healthy_count,omitempty"`
	NotTerminatedCount int `json:"not_terminated_count,omitempty"`
	TotalCount         int `json:"total_count,omitempty"`
	UnhealthyCount     int `json:"unhealthy_count,omitempty"`
}

type InstanceType

type InstanceType struct {
	CpuCount    int                `json:"cpu_count,omitempty"`
	CpuSpeed    string             `json:"cpu_speed,omitempty"`
	Description string             `json:"description,omitempty"`
	Href        string             `json:"href,omitempty"`
	Id          string             `json:"id,omitempty"`
	Kind        string             `json:"kind,omitempty"`
	LegacyId    int                `json:"legacy_id,omitempty"`
	Links       *InstanceTypeLinks `json:"links,omitempty"`
	Memory      string             `json:"memory,omitempty"`
	Name        string             `json:"name,omitempty"`
}

An InstanceType represents a basic hardware configuration for an Instance. Combining all possible configurations of hardware into a smaller, well-known set of options makes instances easier to manage, and allows better allocation efficiency into physical hosts.

type InstanceTypeLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type InstanceTypeLocator

type InstanceTypeLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

InstanceType resource locator, exposes resource actions.

func (*InstanceTypeLocator) Index

func (loc *InstanceTypeLocator) Index(options rsapi.ApiParams) error

GET /api/instance_types GET /api/clouds/:cloud_id/instance_types

Currently not implemented.

func (*InstanceTypeLocator) Show

func (loc *InstanceTypeLocator) Show(options rsapi.ApiParams) error

GET /api/instance_types/:id GET /api/clouds/:cloud_id/instance_types/:id

Currently not implemented.

type InstanceTypeParam

type InstanceTypeParam struct {
	CpuCount    int                `json:"cpu_count,omitempty"`
	CpuSpeed    string             `json:"cpu_speed,omitempty"`
	Description string             `json:"description,omitempty"`
	Href        string             `json:"href,omitempty"`
	Id          string             `json:"id,omitempty"`
	Kind        string             `json:"kind,omitempty"`
	LegacyId    int                `json:"legacy_id,omitempty"`
	Links       *InstanceTypeLinks `json:"links,omitempty"`
	Memory      string             `json:"memory,omitempty"`
	Name        string             `json:"name,omitempty"`
}

type InstancesLinksDeploymentServerArraysInstanceSummaryStruct

type InstancesLinksDeploymentServerArraysInstanceSummaryStruct struct {
	HealthyCount       int `json:"healthy_count,omitempty"`
	NotTerminatedCount int `json:"not_terminated_count,omitempty"`
	TotalCount         int `json:"total_count,omitempty"`
	UnhealthyCount     int `json:"unhealthy_count,omitempty"`
}

type InstancesTimestampsStruct

type InstancesTimestampsStruct struct {
	BootedAt      *time.Time `json:"booted_at,omitempty"`
	CreatedAt     *time.Time `json:"created_at,omitempty"`
	OperationalAt *time.Time `json:"operational_at,omitempty"`
	PendingAt     *time.Time `json:"pending_at,omitempty"`
	StrandedAt    *time.Time `json:"stranded_at,omitempty"`
	TerminatedAt  *time.Time `json:"terminated_at,omitempty"`
	UpdatedAt     *time.Time `json:"updated_at,omitempty"`
}

type IpAddress

type IpAddress struct {
	Address  string          `json:"address,omitempty"`
	Href     string          `json:"href,omitempty"`
	Id       string          `json:"id,omitempty"`
	Kind     string          `json:"kind,omitempty"`
	LegacyId int             `json:"legacy_id,omitempty"`
	Links    *IpAddressLinks `json:"links,omitempty"`
	Name     string          `json:"name,omitempty"`
}

An IpAddress provides an abstraction for IPv4 addresses bindable to Instance resources running in a Cloud.

type IpAddressBinding

type IpAddressBinding struct {
	Href        string                 `json:"href,omitempty"`
	Id          string                 `json:"id,omitempty"`
	Kind        string                 `json:"kind,omitempty"`
	LegacyId    int                    `json:"legacy_id,omitempty"`
	Links       *IpAddressBindingLinks `json:"links,omitempty"`
	PrivatePort int                    `json:"private_port,omitempty"`
	Protocol    string                 `json:"protocol,omitempty"`
	PublicPort  int                    `json:"public_port,omitempty"`
}

An IpAddressBinding represents an abstraction for binding an IpAddress to an instance. The IpAddress is bound immediately for a current instance, or on launch for a next instance.

type IpAddressBindingLinks struct {
	Cloud     *CloudParam     `json:"cloud,omitempty"`
	Instance  *InstanceParam  `json:"instance,omitempty"`
	IpAddress *IpAddressParam `json:"ip_address,omitempty"`
}

type IpAddressBindingLocator

type IpAddressBindingLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

IpAddressBinding resource locator, exposes resource actions.

func (*IpAddressBindingLocator) Index

func (loc *IpAddressBindingLocator) Index(options rsapi.ApiParams) error

GET /api/ip_address_bindings GET /api/clouds/:cloud_id/ip_address_bindings

Currently not implemented.

func (*IpAddressBindingLocator) Show

func (loc *IpAddressBindingLocator) Show(options rsapi.ApiParams) error

GET /api/ip_address_bindings/:id GET /api/clouds/:cloud_id/ip_address_bindings/:id

Currently not implemented.

type IpAddressLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type IpAddressLocator

type IpAddressLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

IpAddress resource locator, exposes resource actions.

func (*IpAddressLocator) Index

func (loc *IpAddressLocator) Index(options rsapi.ApiParams) error

GET /api/ip_addresses GET /api/clouds/:cloud_id/ip_addresses

Currently not implemented.

func (*IpAddressLocator) Show

func (loc *IpAddressLocator) Show(options rsapi.ApiParams) error

GET /api/ip_addresses/:id GET /api/clouds/:cloud_id/ip_addresses/:id

Currently not implemented.

type IpAddressParam

type IpAddressParam struct {
	Address  string          `json:"address,omitempty"`
	Href     string          `json:"href,omitempty"`
	Id       string          `json:"id,omitempty"`
	Kind     string          `json:"kind,omitempty"`
	LegacyId int             `json:"legacy_id,omitempty"`
	Links    *IpAddressLinks `json:"links,omitempty"`
	Name     string          `json:"name,omitempty"`
}

type MultiCloudImage

type MultiCloudImage struct {
	Description     string `json:"description,omitempty"`
	Href            string `json:"href,omitempty"`
	Id              int    `json:"id,omitempty"`
	InheritedSource string `json:"inherited_source,omitempty"`
	Kind            string `json:"kind,omitempty"`
	Name            string `json:"name,omitempty"`
	Version         int    `json:"version,omitempty"`
}

A MultiCloudImage is a RightScale component that functions as a pointer to machine images in specific clouds (e.g. AWS US-East, Rackspace). Each ServerTemplate can reference many MultiCloudImages that define which image should be used when a server is launched in a particular cloud.

type MultiCloudImageLocator

type MultiCloudImageLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

MultiCloudImage resource locator, exposes resource actions.

func (*MultiCloudImageLocator) Index

func (loc *MultiCloudImageLocator) Index(options rsapi.ApiParams) error

GET /api/multi_cloud_images

Currently not implemented.

func (*MultiCloudImageLocator) Show

func (loc *MultiCloudImageLocator) Show(options rsapi.ApiParams) error

GET /api/multi_cloud_images/:id

Currently not implemented.

type MultiCloudImageParam

type MultiCloudImageParam struct {
	Description     string `json:"description,omitempty"`
	Href            string `json:"href,omitempty"`
	Id              int    `json:"id,omitempty"`
	InheritedSource string `json:"inherited_source,omitempty"`
	Kind            string `json:"kind,omitempty"`
	Name            string `json:"name,omitempty"`
	Version         int    `json:"version,omitempty"`
}

type Network

type Network struct {
	Description string        `json:"description,omitempty"`
	Href        string        `json:"href,omitempty"`
	Id          string        `json:"id,omitempty"`
	Kind        string        `json:"kind,omitempty"`
	LegacyId    int           `json:"legacy_id,omitempty"`
	Links       *NetworkLinks `json:"links,omitempty"`
	Name        string        `json:"name,omitempty"`
}

A Network is a logical grouping of network devices.

type NetworkInterface

type NetworkInterface struct {
	Description string                 `json:"description,omitempty"`
	Href        string                 `json:"href,omitempty"`
	Id          string                 `json:"id,omitempty"`
	Kind        string                 `json:"kind,omitempty"`
	Links       *NetworkInterfaceLinks `json:"links,omitempty"`
}

Just like their physical counterparts, NetworkInterfaces join other resources to a network.

type NetworkInterfaceAttachment

type NetworkInterfaceAttachment struct {
	Href  string                           `json:"href,omitempty"`
	Id    string                           `json:"id,omitempty"`
	Kind  string                           `json:"kind,omitempty"`
	Links *NetworkInterfaceAttachmentLinks `json:"links,omitempty"`
}

NetworkInterfaceAttachments represent an attachment between a NetworkInterface and another resource.

type NetworkInterfaceAttachmentLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type NetworkInterfaceAttachmentLocator

type NetworkInterfaceAttachmentLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

NetworkInterfaceAttachment resource locator, exposes resource actions.

func (*NetworkInterfaceAttachmentLocator) Index

GET /api/network_interface_attachments

Currently not implemented.

func (*NetworkInterfaceAttachmentLocator) Show

GET /api/network_interface_attachments/:id

Currently not implemented.

type NetworkInterfaceLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type NetworkInterfaceLocator

type NetworkInterfaceLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

NetworkInterface resource locator, exposes resource actions.

func (*NetworkInterfaceLocator) Index

func (loc *NetworkInterfaceLocator) Index(options rsapi.ApiParams) error

GET /api/network_interfaces

Currently not implemented.

func (*NetworkInterfaceLocator) Show

func (loc *NetworkInterfaceLocator) Show(options rsapi.ApiParams) error

GET /api/network_interfaces/:id

Currently not implemented.

type NetworkLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type NetworkLocator

type NetworkLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Network resource locator, exposes resource actions.

func (*NetworkLocator) Index

func (loc *NetworkLocator) Index(options rsapi.ApiParams) error

GET /api/networks

Currently not implemented.

func (*NetworkLocator) Show

func (loc *NetworkLocator) Show(options rsapi.ApiParams) error

GET /api/networks/:id

Currently not implemented.

type NetworkParam

type NetworkParam struct {
	Description string        `json:"description,omitempty"`
	Href        string        `json:"href,omitempty"`
	Id          string        `json:"id,omitempty"`
	Kind        string        `json:"kind,omitempty"`
	LegacyId    int           `json:"legacy_id,omitempty"`
	Links       *NetworkLinks `json:"links,omitempty"`
	Name        string        `json:"name,omitempty"`
}

type SecurityGroup

type SecurityGroup struct {
	Description string              `json:"description,omitempty"`
	Href        string              `json:"href,omitempty"`
	Id          string              `json:"id,omitempty"`
	Kind        string              `json:"kind,omitempty"`
	LegacyId    int                 `json:"legacy_id,omitempty"`
	Links       *SecurityGroupLinks `json:"links,omitempty"`
	Name        string              `json:"name,omitempty"`
}

Security Groups represent network security profiles that contain lists of firewall rules for different ports and source IP addresses, as well as trust relationships between security groups.

type SecurityGroupCollection

type SecurityGroupCollection struct {
	Count int    `json:"count,omitempty"`
	Href  string `json:"href,omitempty"`
}
type SecurityGroupLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type SecurityGroupLocator

type SecurityGroupLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

SecurityGroup resource locator, exposes resource actions.

func (*SecurityGroupLocator) Index

func (loc *SecurityGroupLocator) Index(options rsapi.ApiParams) error

GET /api/security_groups GET /api/clouds/:cloud_id/security_groups GET /api/clouds/:cloud_id/instances/:instance_id/security_groups

Currently not implemented.

func (*SecurityGroupLocator) Show

func (loc *SecurityGroupLocator) Show(options rsapi.ApiParams) error

GET /api/security_groups/:id GET /api/clouds/:cloud_id/security_groups/:id

Currently not implemented.

type Server

type Server struct {
	Actions         []string     `json:"actions,omitempty"`
	CurrentInstance *Instance    `json:"current_instance,omitempty"`
	Description     string       `json:"description,omitempty"`
	Href            string       `json:"href,omitempty"`
	Id              int          `json:"id,omitempty"`
	Instance        *Instance    `json:"instance,omitempty"`
	Kind            string       `json:"kind,omitempty"`
	Links           *ServerLinks `json:"links,omitempty"`
	Name            string       `json:"name,omitempty"`
	NextInstance    *Instance    `json:"next_instance,omitempty"`
	Tags            []string     `json:"tags,omitempty"`
}

Servers represent the notion of a server/machine from RightScale's perspective. A Server, does not always have a corresponding VM running or provisioned in a cloud. Some clouds use the word "servers" to refer to created VMs. These allocated VMs are not called Servers in the RightScale API, they are called Instances. A Server always has a next_instance association, which will define the configuration to apply to a new instance when the server is launched or started (starting servers is not yet supported through this API). Once a Server is launched/started, a current_instance relationship will exist. Accessing the current_instance of a server results in immediate runtime modification of this running server. Changes to the next_instance association prepares the configuration for the next instance launch/start (therefore they have no effect until such operation is performed).

type ServerArray

type ServerArray struct {
	Actions         []string               `json:"actions,omitempty"`
	Description     string                 `json:"description,omitempty"`
	Href            string                 `json:"href,omitempty"`
	Id              int                    `json:"id,omitempty"`
	InstanceSummary *InstanceSummaryStruct `json:"instance_summary,omitempty"`
	Kind            string                 `json:"kind,omitempty"`
	Links           *ServerArrayLinks      `json:"links,omitempty"`
	Name            string                 `json:"name,omitempty"`
	NextInstance    *Instance              `json:"next_instance,omitempty"`
	State           string                 `json:"state,omitempty"`
	Tags            []string               `json:"tags,omitempty"`
}

A server array represents a logical group of instances and allows to resize(grow/shrink) that group based on certain elasticity parameters. A server array just like a server always has a next_instance association, which will define the configuration to apply when a new instance is launched. But unlike a server which has a current_instance relationship, the server array has a current_instances relationship that gives the information about all the running instances in the array. Changes to the next_instance association prepares the configuration for the next instance that is to be launched in the array and will therefore not affect any of the currently running instances.

type ServerArrayLinks struct {
	Account          *AccountParam    `json:"account,omitempty"`
	Cloud            *CloudParam      `json:"cloud,omitempty"`
	CurrentInstances []*InstanceParam `json:"current_instances,omitempty"`
	NextInstance     *InstanceParam   `json:"next_instance,omitempty"`
}

type ServerArrayLocator

type ServerArrayLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

ServerArray resource locator, exposes resource actions.

func (*ServerArrayLocator) Index

func (loc *ServerArrayLocator) Index(options rsapi.ApiParams) error

GET /api/server_arrays

Currently not implemented.

func (*ServerArrayLocator) Show

func (loc *ServerArrayLocator) Show(options rsapi.ApiParams) error

GET /api/server_arrays/:id

Currently not implemented.

type ServerArrayParam

type ServerArrayParam struct {
	Actions         []string                                                   `json:"actions,omitempty"`
	Description     string                                                     `json:"description,omitempty"`
	Href            string                                                     `json:"href,omitempty"`
	Id              int                                                        `json:"id,omitempty"`
	InstanceSummary *InstancesLinksDeploymentServerArraysInstanceSummaryStruct `json:"instance_summary,omitempty"`
	Kind            string                                                     `json:"kind,omitempty"`
	Links           *ServerArrayLinks                                          `json:"links,omitempty"`
	Name            string                                                     `json:"name,omitempty"`
	NextInstance    *InstanceParam                                             `json:"next_instance,omitempty"`
	State           string                                                     `json:"state,omitempty"`
	Tags            []string                                                   `json:"tags,omitempty"`
}
type ServerLinks struct {
	Account         *AccountParam  `json:"account,omitempty"`
	Cloud           *CloudParam    `json:"cloud,omitempty"`
	CurrentInstance *InstanceParam `json:"current_instance,omitempty"`
	NextInstance    *InstanceParam `json:"next_instance,omitempty"`
}

type ServerLocator

type ServerLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Server resource locator, exposes resource actions.

func (*ServerLocator) Index

func (loc *ServerLocator) Index(options rsapi.ApiParams) error

GET /api/servers

Currently not implemented.

func (*ServerLocator) Show

func (loc *ServerLocator) Show(options rsapi.ApiParams) error

GET /api/servers/:id

Currently not implemented.

type ServerParam

type ServerParam struct {
	Actions         []string       `json:"actions,omitempty"`
	CurrentInstance *InstanceParam `json:"current_instance,omitempty"`
	Description     string         `json:"description,omitempty"`
	Href            string         `json:"href,omitempty"`
	Id              int            `json:"id,omitempty"`
	Instance        *InstanceParam `json:"instance,omitempty"`
	Kind            string         `json:"kind,omitempty"`
	Links           *ServerLinks   `json:"links,omitempty"`
	Name            string         `json:"name,omitempty"`
	NextInstance    *InstanceParam `json:"next_instance,omitempty"`
	Tags            []string       `json:"tags,omitempty"`
}

type ServerTemplate

type ServerTemplate struct {
	Description string `json:"description,omitempty"`
	Href        string `json:"href,omitempty"`
	Id          int    `json:"id,omitempty"`
	Kind        string `json:"kind,omitempty"`
	Name        string `json:"name,omitempty"`
	Version     int    `json:"version,omitempty"`
}

ServerTemplates allow you to pre-configure servers by starting from a base image and adding scripts that run during the boot, operational, and shutdown phases. A ServerTemplate is a description of how a new instance will be configured when it is provisioned by your cloud provider. All revisions of a ServerTemplate belong to a ServerTemplate lineage that is exposed by the "lineage" attribute. (NOTE: This attribute is merely a string to locate all revisions of a ServerTemplate and NOT a working URL)

type ServerTemplateLocator

type ServerTemplateLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

ServerTemplate resource locator, exposes resource actions.

func (*ServerTemplateLocator) Index

func (loc *ServerTemplateLocator) Index(options rsapi.ApiParams) error

GET /api/server_templates

Currently not implemented.

func (*ServerTemplateLocator) Show

func (loc *ServerTemplateLocator) Show(options rsapi.ApiParams) error

GET /api/server_templates/:id

Currently not implemented.

type ServerTemplateParam

type ServerTemplateParam struct {
	Description string `json:"description,omitempty"`
	Href        string `json:"href,omitempty"`
	Id          int    `json:"id,omitempty"`
	Kind        string `json:"kind,omitempty"`
	Name        string `json:"name,omitempty"`
	Version     int    `json:"version,omitempty"`
}

type SshKey

type SshKey struct {
	Fingerprint string `json:"fingerprint,omitempty"`
	Href        string `json:"href,omitempty"`
	Id          string `json:"id,omitempty"`
	Kind        string `json:"kind,omitempty"`
	LegacyId    int    `json:"legacy_id,omitempty"`
	ResourceUid string `json:"resource_uid,omitempty"`
}

Ssh Keys represent a created SSH Key that exists in the cloud.

type SshKeyLocator

type SshKeyLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

SshKey resource locator, exposes resource actions.

func (*SshKeyLocator) Index

func (loc *SshKeyLocator) Index(options rsapi.ApiParams) error

GET /api/ssh_keys GET /api/clouds/:cloud_id/ssh_keys

Currently not implemented.

func (*SshKeyLocator) Show

func (loc *SshKeyLocator) Show(options rsapi.ApiParams) error

GET /api/ssh_keys/:id GET /api/clouds/:cloud_id/ssh_keys/:id

Currently not implemented.

type SshKeyParam

type SshKeyParam struct {
	Fingerprint string `json:"fingerprint,omitempty"`
	Href        string `json:"href,omitempty"`
	Id          string `json:"id,omitempty"`
	Kind        string `json:"kind,omitempty"`
	LegacyId    int    `json:"legacy_id,omitempty"`
	ResourceUid string `json:"resource_uid,omitempty"`
}

type Subnet

type Subnet struct {
	Description string       `json:"description,omitempty"`
	Href        string       `json:"href,omitempty"`
	Id          string       `json:"id,omitempty"`
	Kind        string       `json:"kind,omitempty"`
	LegacyId    int          `json:"legacy_id,omitempty"`
	Links       *SubnetLinks `json:"links,omitempty"`
	Name        string       `json:"name,omitempty"`
}

A Subnet is a logical grouping of network devices. An Instance can have many Subnets.

type SubnetCollection

type SubnetCollection struct {
	Count int    `json:"count,omitempty"`
	Href  string `json:"href,omitempty"`
}
type SubnetLinks struct {
	Cloud *CloudParam `json:"cloud,omitempty"`
}

type SubnetLocator

type SubnetLocator struct {
	UrlResolver
	// contains filtered or unexported fields
}

Subnet resource locator, exposes resource actions.

func (*SubnetLocator) Index

func (loc *SubnetLocator) Index(options rsapi.ApiParams) error

GET /api/subnets GET /api/clouds/:cloud_id/subnets GET /api/clouds/:cloud_id/instances/:instance_id/subnets

Currently not implemented.

func (*SubnetLocator) Show

func (loc *SubnetLocator) Show(options rsapi.ApiParams) error

GET /api/subnets/:id GET /api/clouds/:cloud_id/subnets/:id

Currently not implemented.

type TimestampsStruct

type TimestampsStruct struct {
	BootedAt      *time.Time `json:"booted_at,omitempty"`
	CreatedAt     *time.Time `json:"created_at,omitempty"`
	OperationalAt *time.Time `json:"operational_at,omitempty"`
	PendingAt     *time.Time `json:"pending_at,omitempty"`
	StrandedAt    *time.Time `json:"stranded_at,omitempty"`
	TerminatedAt  *time.Time `json:"terminated_at,omitempty"`
	UpdatedAt     *time.Time `json:"updated_at,omitempty"`
}

type UrlResolver

type UrlResolver string

Url resolver produces an action URL and HTTP method from its name and a given resource href. The algorithm consists of first extracting the variables from the href and then substituing them in the action path. If there are more than one action paths then the algorithm picks the one that can substitute the most variables.

func (*UrlResolver) Url

func (r *UrlResolver) Url(rName, aName string) (*metadata.ActionPath, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL