ssc

package
v8.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "1.0"

API Version

Variables

View Source
var GenMetadata = map[string]*metadata.Resource{
	"AccountPreference": &metadata.Resource{
		Name: "AccountPreference",
		Description: `The AccountPreference resource stores preferences that apply account-wide, such as UI customization settings and other settings.
The Self-Service portal uses some of these preferences in the portal itself, and this resource allows you to extend the settings
to use in your own integration.`,
		Identifier: "application/vnd.rightscale.self_service.account_preference",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `List the AccountPreferences for this account.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/account_preferences",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/account_preferences`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by group, so that only AccountPreferences belonging to that group are returned`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by group, so that only AccountPreferences belonging to that group are returned`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Get details for a particular AccountPreference`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/account_preferences/%s",
						Variables:  []string{"account_id", "name"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/account_preferences/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "create",
				Description: `Create a new AccountPreference or update an existing AccountPreference with the new value`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/api/catalog/accounts/%s/account_preferences",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/account_preferences`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "group_name",
						Description: `The group to place this AccountPreference in. Any string value is accepted - the group does not need to exist`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `The name for the new AccountPreference or AccountPreference to update (note this is the key for this resource)`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "value",
						Description: `The value to set for this AccountPreference`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "group_name",
						Description: `The group to place this AccountPreference in. Any string value is accepted - the group does not need to exist`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `The name for the new AccountPreference or AccountPreference to update (note this is the key for this resource)`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "value",
						Description: `The value to set for this AccountPreference`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "delete",
				Description: `Delete an AccountPreference`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/api/catalog/accounts/%s/account_preferences/%s",
						Variables:  []string{"account_id", "name"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/account_preferences/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},
		},
	},
	"Application": &metadata.Resource{
		Name: "Application",
		Description: `An Application is an element in the Catalog that can be launched by users. Applications are generally created by uploading CAT
files to the Designer and publishing them to the Catalog, though they can also be created via API calls to the Catalog directly without
going through Designer. If an Application was created from Designer through the publish action, it contains a link back to the Template
resource in Designer.
In the Self-Service portal, an Application is equivalent to an item in the Catalog. Most users have access to these Application resources
and can launch them to create Executions in the Manager application.`,
		Identifier: "application/vnd.rightscale.self_service.application",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `List the Applications available in the specified Catalog.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/catalogs/%s/applications",
						Variables:  []string{"catalog_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "ids[]",
						Description: `An optional list of Application IDs to retrieve. If not specified, all are returned.`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "ids[]",
						Description: `An optional list of Application IDs to retrieve. If not specified, all are returned.`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Show detailed information about a given Application.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/catalogs/%s/applications/%s",
						Variables:  []string{"catalog_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `Optional view to return`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "expanded"},
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `Optional view to return`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "expanded"},
					},
				},
			},

			&metadata.Action{
				Name:        "create",
				Description: `Create a new Application in the Catalog.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/api/catalog/catalogs/%s/applications",
						Variables:  []string{"catalog_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "compiled_cat[cat_parser_gem_version]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[compiler_ver]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[conditions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[definitions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[imports]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[long_description]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[mappings]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[name]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[operations]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[outputs]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[package]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[parameters]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[permissions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[resources]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[rs_ca_ver]",
						Description: ``,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[short_description]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[source]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "long_description",
						Description: `Long description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `Name of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_required",
						Description: `Whether the CloudApp requires a schedule to be provided at launch time. If set to false, allows user to pick from '24/7' schedule when launching in the UI`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][created_from]",
						Description: `optional HREF of the Schedule resource used to create this schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][description]",
						Description: `An optional description that will help users understand the purpose of the Schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][name]",
						Description: `The name of the Schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][hour]",
						Description: `The hour of day from 0 to 23.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][minute]",
						Description: `The minute from 0 to 59.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][rule]",
						Description: `A RRULE string describing the recurrence rule.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][hour]",
						Description: `The hour of day from 0 to 23.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][minute]",
						Description: `The minute from 0 to 59.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][rule]",
						Description: `A RRULE string describing the recurrence rule.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "short_description",
						Description: `Short description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "template_href",
						Description: `If created from a Template, the template href can be provided to maintain the relationship between the resources.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "compiled_cat",
						Description: `The compiled source of the CAT file. This can be obtained by calling Template.compile or Template.show in the Designer application.`,
						Type:        "*CompiledCAT",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "long_description",
						Description: `Long description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `Name of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_required",
						Description: `Whether the CloudApp requires a schedule to be provided at launch time. If set to false, allows user to pick from '24/7' schedule when launching in the UI`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules",
						Description: `Schedules available to users when launching the application`,
						Type:        "[]*Schedule",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "short_description",
						Description: `Short description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "template_href",
						Description: `If created from a Template, the template href can be provided to maintain the relationship between the resources.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Update the content of an existing Application.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/api/catalog/catalogs/%s/applications/%s",
						Variables:  []string{"catalog_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "compiled_cat[cat_parser_gem_version]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[compiler_ver]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[conditions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[definitions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[imports]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[long_description]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[mappings]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[name]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[operations]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[outputs]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[package]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[parameters]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[permissions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[resources]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[rs_ca_ver]",
						Description: ``,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[short_description]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[source]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "long_description",
						Description: `Long description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `Name of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_required",
						Description: `Whether the CloudApp requires a schedule to be provided at launch time. If set to false, allows user to pick from '24/7' schedule when launching in the UI`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][created_from]",
						Description: `optional HREF of the Schedule resource used to create this schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][description]",
						Description: `An optional description that will help users understand the purpose of the Schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][name]",
						Description: `The name of the Schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][hour]",
						Description: `The hour of day from 0 to 23.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][minute]",
						Description: `The minute from 0 to 59.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][rule]",
						Description: `A RRULE string describing the recurrence rule.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][hour]",
						Description: `The hour of day from 0 to 23.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][minute]",
						Description: `The minute from 0 to 59.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][rule]",
						Description: `A RRULE string describing the recurrence rule.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "short_description",
						Description: `Short description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "template_href",
						Description: `A template href can be provided to maintain the relationship between the resources.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "compiled_cat",
						Description: `The compiled source of the CAT file. This can be obtained by calling Template.compile or Template.show in the Designer application.`,
						Type:        "*CompiledCAT",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "long_description",
						Description: `Long description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `Name of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_required",
						Description: `Whether the CloudApp requires a schedule to be provided at launch time. If set to false, allows user to pick from '24/7' schedule when launching in the UI`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules",
						Description: `Schedules available to users when launching the application`,
						Type:        "[]*Schedule",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "short_description",
						Description: `Short description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "template_href",
						Description: `A template href can be provided to maintain the relationship between the resources.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "multi_update",
				Description: `Update the content of multiple Applications.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/api/catalog/catalogs/%s/applications",
						Variables:  []string{"catalog_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "compiled_cat[cat_parser_gem_version]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[compiler_ver]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[conditions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[definitions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[imports]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[long_description]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[mappings]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[name]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[operations]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[outputs]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[package]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[parameters]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[permissions]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[dependency_hashes][]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[resources]",
						Description: ``,
						Type:        "map",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[rs_ca_ver]",
						Description: ``,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[short_description]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "compiled_cat[source]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "id",
						Description: `The Application ID to update`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "long_description",
						Description: `Long description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `Name of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_required",
						Description: `Whether the CloudApp requires a schedule to be provided at launch time. If set to false, allows user to pick from '24/7' schedule when launching in the UI`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][created_from]",
						Description: `optional HREF of the Schedule resource used to create this schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][description]",
						Description: `An optional description that will help users understand the purpose of the Schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][name]",
						Description: `The name of the Schedule`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][hour]",
						Description: `The hour of day from 0 to 23.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][minute]",
						Description: `The minute from 0 to 59.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][rule]",
						Description: `A RRULE string describing the recurrence rule.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][hour]",
						Description: `The hour of day from 0 to 23.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][minute]",
						Description: `The minute from 0 to 59.`,
						Type:        "int",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules[][start_recurrence][rule]",
						Description: `A RRULE string describing the recurrence rule.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "short_description",
						Description: `Short description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "template_href",
						Description: `A template href can be provided to maintain the relationship between the resources.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "compiled_cat",
						Description: `The compiled source of the CAT file. This can be obtained by calling Template.compile or Template.show in the Designer application.`,
						Type:        "*CompiledCAT",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "id",
						Description: `The Application ID to update`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "long_description",
						Description: `Long description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `Name of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_required",
						Description: `Whether the CloudApp requires a schedule to be provided at launch time. If set to false, allows user to pick from '24/7' schedule when launching in the UI`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedules",
						Description: `Schedules available to users when launching the application`,
						Type:        "[]*Schedule",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "short_description",
						Description: `Short description of application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "template_href",
						Description: `A template href can be provided to maintain the relationship between the resources.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "delete",
				Description: `Delete an Application from the Catalog`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/api/catalog/catalogs/%s/applications/%s",
						Variables:  []string{"catalog_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "multi_delete",
				Description: `Delete multiple Applications from the Catalog`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/api/catalog/catalogs/%s/applications",
						Variables:  []string{"catalog_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "ids[]",
						Description: `The Application IDs to delete`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "ids[]",
						Description: `The Application IDs to delete`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "download",
				Description: `Download the underlying CAT source of an Application.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/catalogs/%s/applications/%s/download",
						Variables:  []string{"catalog_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications/([^/]+)/download`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "api_version",
						Description: `The API version (only valid value is currently "1.0")`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "api_version",
						Description: `The API version (only valid value is currently "1.0")`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "launch",
				Description: `Launches an Application by creating an Execution with ScheduledActions as needed to match the optional Schedule provided.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/api/catalog/catalogs/%s/applications/%s/actions/launch",
						Variables:  []string{"catalog_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/catalogs/([^/]+)/applications/([^/]+)/actions/launch`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "defer_launch",
						Description: `Whether or not to defer launching the execution. Setting this value to true will keep the execution in not_started state until it is explicitly launched or the first scheduled start operation occurs.`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "description",
						Description: `The description for the execution. The description of the Application will be used if none is provided.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "end_date",
						Description: `When the CloudApp should be automatically terminated.`,
						Type:        "*time.Time",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `The name for the Execution. The Application name will be used if none is provided. This will be used as the name of the deployment (appended with a unique ID).`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "options[][name]",
						Description: `Name of configuration option`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "options[][type]",
						Description: `Type of configuration option.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"string", "number", "list"},
					},
					&metadata.ActionParam{
						Name:        "options[][value]",
						Description: `Configuration option value, a string, integer or array of strings depending on type`,
						Type:        "interface{}",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_name",
						Description: `Name of the Schedule to use when launching. It must match one of the schedules attached to the Application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "defer_launch",
						Description: `Whether or not to defer launching the execution. Setting this value to true will keep the execution in not_started state until it is explicitly launched or the first scheduled start operation occurs.`,
						Type:        "bool",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "description",
						Description: `The description for the execution. The description of the Application will be used if none is provided.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "end_date",
						Description: `When the CloudApp should be automatically terminated.`,
						Type:        "*time.Time",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "name",
						Description: `The name for the Execution. The Application name will be used if none is provided. This will be used as the name of the deployment (appended with a unique ID).`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "options",
						Description: `The configuration options of the Execution. These are the values provided for the CloudApp parameters.`,
						Type:        "[]*ConfigurationOption",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "schedule_name",
						Description: `Name of the Schedule to use when launching. It must match one of the schedules attached to the Application`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},
		},
	},
	"EndUser": &metadata.Resource{
		Name:        "EndUser",
		Description: ``,
		Identifier:  "application/vnd.rightscale.self_service.end_user",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `Show all Self-Service Only End Users that belong to this account.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/end_users",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/end_users`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by user ID`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by user ID`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "create",
				Description: `Grant a user Self-Service Only End User access to this account.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/api/catalog/accounts/%s/end_users",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/end_users`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "user_ids[]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "user_ids",
						Description: `User IDs to add as SS End Users to this account`,
						Type:        "[]string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "delete",
				Description: ``,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/api/catalog/accounts/%s/end_users",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/end_users`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "user_ids[]",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "user_ids",
						Description: `User IDs to remove as SS End Users to this account`,
						Type:        "[]string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "non_ss_users",
				Description: ``,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/end_users/available",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/end_users/available`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},
		},
	},
	"NotificationRule": &metadata.Resource{
		Name: "NotificationRule",
		Description: `A notification rule describes which notification should be created
        when events occur in the system. Events may be generated when an
        execution status changes or when an operation fails for example.
        A rule has a source which can be a specific resource or a group of
        resources (described via a link-like syntax), a target which
        corresponds to a user (for now) and a minimum severity used to filter
        out events with lower severities.`,
		Identifier: "application/vnd.rightscale.self_service.notification_rule",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `List all notification rules, potentially filtering by a collection of resources.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/notification_rules",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/notification_rules`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by category.`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name: "source",
						Description: `List all notification rules where the target is the current user.
                          The list can be further filtered by notification source: either by
                          source type or by specific source.
                          * To retrieve all notification rules that apply to all executions use:
                            GET nofication_rules?source==/api/projects/1234/executions
                          * To retrieve all notification rules that apply to a specific execution use:
                            GET notification_rules?source==/api/projects/1234/executions/5678`,
						Type:      "string",
						Location:  metadata.QueryParam,
						Mandatory: true,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name:        "targets",
						Description: `Comma separated list of target ids. Note, currently only "me" is allowed.`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by category.`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name: "source",
						Description: `List all notification rules where the target is the current user.
                          The list can be further filtered by notification source: either by
                          source type or by specific source.
                          * To retrieve all notification rules that apply to all executions use:
                            GET nofication_rules?source==/api/projects/1234/executions
                          * To retrieve all notification rules that apply to a specific execution use:
                            GET notification_rules?source==/api/projects/1234/executions/5678`,
						Type:      "string",
						Location:  metadata.QueryParam,
						Mandatory: true,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name:        "targets",
						Description: `Comma separated list of target ids. Note, currently only "me" is allowed.`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name: "create",
				Description: `Create one notification rule for a specific target and source.
          The source must be unique in the scope of target and account.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/api/catalog/accounts/%s/notification_rules",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/notification_rules`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: ``,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "category",
						Description: `The type of notification for the resource.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"lifecycle", "scheduled"},
					},
					&metadata.ActionParam{
						Name: "min_severity",
						Description: `The lowest level of notifications for the target to receive.
                    Setting this to "error" will result in only receiving error notifications,
                    whereas setting it to "info" will result in receiving both info and error notifications,
                    and setting it to "none" will result in not receiving any notifications.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
						ValidValues: []string{"error", "info", "none"},
					},
					&metadata.ActionParam{
						Name: "source",
						Description: `The resource (or resource collection) that would trigger the notification.
                    "/api/manager/projects/1234/executions" refers to ALL executions in the project,
                    "/api/manager/projects/1234/executions/5678" refers to just one execution, and
                    "/api/manager/projects/1234/executions?filter[]=created_by==me" refers to executions
                    created by the submitting user. The source must be unique in the scope of target and account.
                    Note that at this time, "me" is the only supported target filter.`,
						Type:      "string",
						Location:  metadata.PayloadParam,
						Mandatory: true,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name: "target",
						Description: `The notification target (user) that the rule applies to.
                    Note that at this time, "me" is the only supported target.`,
						Type:      "string",
						Location:  metadata.PayloadParam,
						Mandatory: true,
						NonBlank:  false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: ``,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "category",
						Description: `The type of notification for the resource.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"lifecycle", "scheduled"},
					},
					&metadata.ActionParam{
						Name: "min_severity",
						Description: `The lowest level of notifications for the target to receive.
                    Setting this to "error" will result in only receiving error notifications,
                    whereas setting it to "info" will result in receiving both info and error notifications,
                    and setting it to "none" will result in not receiving any notifications.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
						ValidValues: []string{"error", "info", "none"},
					},
					&metadata.ActionParam{
						Name: "source",
						Description: `The resource (or resource collection) that would trigger the notification.
                    "/api/manager/projects/1234/executions" refers to ALL executions in the project,
                    "/api/manager/projects/1234/executions/5678" refers to just one execution, and
                    "/api/manager/projects/1234/executions?filter[]=created_by==me" refers to executions
                    created by the submitting user. The source must be unique in the scope of target and account.
                    Note that at this time, "me" is the only supported target filter.`,
						Type:      "string",
						Location:  metadata.PayloadParam,
						Mandatory: true,
						NonBlank:  false,
					},
					&metadata.ActionParam{
						Name: "target",
						Description: `The notification target (user) that the rule applies to.
                    Note that at this time, "me" is the only supported target.`,
						Type:      "string",
						Location:  metadata.PayloadParam,
						Mandatory: true,
						NonBlank:  false,
					},
				},
			},

			&metadata.Action{
				Name:        "patch",
				Description: `Change min severity of existing rule`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PATCH",
						Pattern:    "/api/catalog/accounts/%s/notification_rules/%s",
						Variables:  []string{"account_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/notification_rules/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name: "min_severity",
						Description: `The lowest level of notifications for the target to receive.
                    Setting this to "error" will result in only receiving error notifications,
                    whereas setting it to "info" will result in receiving both info and error notifications,
                    and setting it to "none" will result in not receiving any notifications.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
						ValidValues: []string{"error", "info", "none"},
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name: "min_severity",
						Description: `The lowest level of notifications for the target to receive.
                    Setting this to "error" will result in only receiving error notifications,
                    whereas setting it to "info" will result in receiving both info and error notifications,
                    and setting it to "none" will result in not receiving any notifications.`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
						ValidValues: []string{"error", "info", "none"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Show one notification rule.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/notification_rules/%s",
						Variables:  []string{"account_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/notification_rules/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "delete",
				Description: `Delete one notification rule.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/api/catalog/accounts/%s/notification_rules/%s",
						Variables:  []string{"account_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/notification_rules/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "multi_delete",
				Description: `Delete one or more notification rules by id or source and target.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/api/catalog/accounts/%s/notification_rules",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/notification_rules`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "id",
						Description: `Notification rule id`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "source",
						Description: `The exact source of the rule to be deleted`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name: "target",
						Description: `The notification target (user) that the rule applies to.
                    Note that at this time, "me" is the only supported target.`,
						Type:      "string",
						Location:  metadata.PayloadParam,
						Mandatory: false,
						NonBlank:  false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "id",
						Description: `Notification rule id`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "source",
						Description: `The exact source of the rule to be deleted`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name: "target",
						Description: `The notification target (user) that the rule applies to.
                    Note that at this time, "me" is the only supported target.`,
						Type:      "string",
						Location:  metadata.PayloadParam,
						Mandatory: false,
						NonBlank:  false,
					},
				},
			},
		},
	},
	"UserPreference": &metadata.Resource{
		Name: "UserPreference",
		Description: `The UserPreference resource stores preferences on a per user basis, such as default notification preference.
The Self-Service portal uses these preferences in the portal.`,
		Identifier: "application/vnd.rightscale.self_service.user_preference",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name: "index",
				Description: `List the UserPreference for users in this account.
Only administrators and infrastructure users may request the preferences of other users.
Users who are not members of the admin role need to specify a filter with their ID in order to retrieve their preferences.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/user_preferences",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/user_preferences`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by user, so that only UserPreference belonging to that user are returned. Use "me" as a shortcut for the current user ID.`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: `Optional view to return`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "expanded"},
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by user, so that only UserPreference belonging to that user are returned. Use "me" as a shortcut for the current user ID.`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "view",
						Description: `Optional view to return`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "expanded"},
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Get details for a particular UserPreference`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/user_preferences/%s",
						Variables:  []string{"account_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/user_preferences/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `Optional view to return`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "expanded"},
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "view",
						Description: `Optional view to return`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"default", "expanded"},
					},
				},
			},

			&metadata.Action{
				Name: "create",
				Description: `Create a new UserPreference.
Multiple resources can be created at once with a multipart request.
Values are validated with the corresponding UserPreferenceInfo.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/api/catalog/accounts/%s/user_preferences",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/user_preferences`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "user_id",
						Description: `Administrators can create preferences for other users by providing this value`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "user_preference_info_id",
						Description: `The ID for the UserPreferenceInfo defining this UserPreference`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "value",
						Description: `The value to set for this UserPreference`,
						Type:        "interface{}",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "user_id",
						Description: `Administrators can create preferences for other users by providing this value`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "user_preference_info_id",
						Description: `The ID for the UserPreferenceInfo defining this UserPreference`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "value",
						Description: `The value to set for this UserPreference`,
						Type:        "interface{}",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name: "update",
				Description: `Update the value of a UserPreference.
Multiple values may be updated using a multipart request.
Values are validated with the corresponding UserPreferenceInfo.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PATCH",
						Pattern:    "/api/catalog/accounts/%s/user_preferences/%s",
						Variables:  []string{"account_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/user_preferences/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "id",
						Description: `In a multipart request, the ID of the UserPreference to update`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "value",
						Description: `The value to set for this UserPreference`,
						Type:        "interface{}",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "id",
						Description: `In a multipart request, the ID of the UserPreference to update`,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "value",
						Description: `The value to set for this UserPreference`,
						Type:        "interface{}",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "delete",
				Description: `Delete a UserPreference`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/api/catalog/accounts/%s/user_preferences/%s",
						Variables:  []string{"account_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/user_preferences/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},
		},
	},
	"UserPreferenceInfo": &metadata.Resource{
		Name: "UserPreferenceInfo",
		Description: `The UserPreferenceInfo resource defines the available user preferences supported by the system.
It is also used to validate values saved in UserPreference.`,
		Identifier: "application/vnd.rightscale.self_service.user_preference_info",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `List the UserPreferenceInfo.`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/user_preference_infos",
						Variables:  []string{"account_id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/user_preference_infos`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by category and/or name`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "filter[]",
						Description: `Filter by category and/or name`,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Get details for a particular UserPreferenceInfo`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/api/catalog/accounts/%s/user_preference_infos/%s",
						Variables:  []string{"account_id", "id"},
						Regexp:     regexp.MustCompile(`/api/catalog/accounts/([^/]+)/user_preference_infos/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},
		},
	},
}

Consists of a map of resource name to resource metadata.

Functions

This section is empty.

Types

type API

type API struct {
	*rsapi.API
}

API is the Self-Service catalog client.

func New

func New(h string, a rsapi.Authenticator) *API

New returns a Self-Service catalog API client. It makes a test API request and returns an error if authentication fails.

func (*API) AccountPreferenceLocator

func (api *API) AccountPreferenceLocator(href string) *AccountPreferenceLocator

AccountPreferenceLocator builds a locator from the given href.

func (*API) ApplicationLocator

func (api *API) ApplicationLocator(href string) *ApplicationLocator

ApplicationLocator builds a locator from the given href.

func (*API) EndUserLocator

func (api *API) EndUserLocator(href string) *EndUserLocator

EndUserLocator builds a locator from the given href.

func (*API) NotificationRuleLocator

func (api *API) NotificationRuleLocator(href string) *NotificationRuleLocator

NotificationRuleLocator builds a locator from the given href.

func (*API) UserPreferenceInfoLocator

func (api *API) UserPreferenceInfoLocator(href string) *UserPreferenceInfoLocator

UserPreferenceInfoLocator builds a locator from the given href.

func (*API) UserPreferenceLocator

func (api *API) UserPreferenceLocator(href string) *UserPreferenceLocator

UserPreferenceLocator builds a locator from the given href.

type AccountPreference

type AccountPreference struct {
	CreatedBy  *User             `json:"created_by,omitempty"`
	GroupName  string            `json:"group_name,omitempty"`
	Href       string            `json:"href,omitempty"`
	Kind       string            `json:"kind,omitempty"`
	Name       string            `json:"name,omitempty"`
	Timestamps *TimestampsStruct `json:"timestamps,omitempty"`
	Value      string            `json:"value,omitempty"`
}

The AccountPreference resource stores preferences that apply account-wide, such as UI customization settings and other settings. The Self-Service portal uses some of these preferences in the portal itself, and this resource allows you to extend the settings to use in your own integration.

func (*AccountPreference) Locator

Locator returns a locator for the given resource

type AccountPreferenceLocator

type AccountPreferenceLocator struct {
	Href
	// contains filtered or unexported fields
}

AccountPreferenceLocator exposes the AccountPreference resource actions.

func (*AccountPreferenceLocator) Create

func (loc *AccountPreferenceLocator) Create(groupName string, name string, value string) (*AccountPreferenceLocator, error)

POST /api/catalog/accounts/:account_id/account_preferences

Create a new AccountPreference or update an existing AccountPreference with the new value

func (*AccountPreferenceLocator) Delete

func (loc *AccountPreferenceLocator) Delete() error

DELETE /api/catalog/accounts/:account_id/account_preferences/:name

Delete an AccountPreference

func (*AccountPreferenceLocator) Index

GET /api/catalog/accounts/:account_id/account_preferences

List the AccountPreferences for this account.

func (*AccountPreferenceLocator) Show

GET /api/catalog/accounts/:account_id/account_preferences/:name

Get details for a particular AccountPreference

type Application

type Application struct {
	CompilationHref    string            `json:"compilation_href,omitempty"`
	CompiledCat        string            `json:"compiled_cat,omitempty"`
	CompilerVer        string            `json:"compiler_ver,omitempty"`
	CreatedBy          *User             `json:"created_by,omitempty"`
	Href               string            `json:"href,omitempty"`
	Id                 string            `json:"id,omitempty"`
	Kind               string            `json:"kind,omitempty"`
	LongDescription    string            `json:"long_description,omitempty"`
	Name               string            `json:"name,omitempty"`
	Parameters         []*Parameter      `json:"parameters,omitempty"`
	RequiredParameters []string          `json:"required_parameters,omitempty"`
	ScheduleRequired   bool              `json:"schedule_required,omitempty"`
	Schedules          []*Schedule       `json:"schedules,omitempty"`
	ShortDescription   string            `json:"short_description,omitempty"`
	TemplateInfo       *TemplateInfo     `json:"template_info,omitempty"`
	Timestamps         *TimestampsStruct `json:"timestamps,omitempty"`
}

An Application is an element in the Catalog that can be launched by users. Applications are generally created by uploading CAT files to the Designer and publishing them to the Catalog, though they can also be created via API calls to the Catalog directly without going through Designer. If an Application was created from Designer through the publish action, it contains a link back to the Template resource in Designer. In the Self-Service portal, an Application is equivalent to an item in the Catalog. Most users have access to these Application resources and can launch them to create Executions in the Manager application.

func (*Application) Locator

func (r *Application) Locator(api *API) *ApplicationLocator

Locator returns a locator for the given resource

type ApplicationLocator

type ApplicationLocator struct {
	Href
	// contains filtered or unexported fields
}

ApplicationLocator exposes the Application resource actions.

func (*ApplicationLocator) Create

func (loc *ApplicationLocator) Create(name string, shortDescription string, options rsapi.APIParams) (*ApplicationLocator, error)

POST /api/catalog/catalogs/:catalog_id/applications

Create a new Application in the Catalog.

func (*ApplicationLocator) Delete

func (loc *ApplicationLocator) Delete() error

DELETE /api/catalog/catalogs/:catalog_id/applications/:id

Delete an Application from the Catalog

func (*ApplicationLocator) Download

func (loc *ApplicationLocator) Download(apiVersion string) error

GET /api/catalog/catalogs/:catalog_id/applications/:id/download

Download the underlying CAT source of an Application.

func (*ApplicationLocator) Index

func (loc *ApplicationLocator) Index(options rsapi.APIParams) ([]*Application, error)

GET /api/catalog/catalogs/:catalog_id/applications

List the Applications available in the specified Catalog.

func (*ApplicationLocator) Launch

func (loc *ApplicationLocator) Launch(options rsapi.APIParams) error

POST /api/catalog/catalogs/:catalog_id/applications/:id/actions/launch

Launches an Application by creating an Execution with ScheduledActions as needed to match the optional Schedule provided.

func (*ApplicationLocator) MultiDelete

func (loc *ApplicationLocator) MultiDelete(ids []string) error

DELETE /api/catalog/catalogs/:catalog_id/applications

Delete multiple Applications from the Catalog

func (*ApplicationLocator) MultiUpdate

func (loc *ApplicationLocator) MultiUpdate(id string, options rsapi.APIParams) error

PUT /api/catalog/catalogs/:catalog_id/applications

Update the content of multiple Applications.

func (*ApplicationLocator) Show

func (loc *ApplicationLocator) Show(options rsapi.APIParams) (*Application, error)

GET /api/catalog/catalogs/:catalog_id/applications/:id

Show detailed information about a given Application.

func (*ApplicationLocator) Update

func (loc *ApplicationLocator) Update(options rsapi.APIParams) error

PUT /api/catalog/catalogs/:catalog_id/applications/:id

Update the content of an existing Application.

type CompiledCAT

type CompiledCAT struct {
	CatParserGemVersion string                   `json:"cat_parser_gem_version,omitempty"`
	CompilerVer         string                   `json:"compiler_ver,omitempty"`
	Conditions          map[string]interface{}   `json:"conditions,omitempty"`
	Definitions         map[string]interface{}   `json:"definitions,omitempty"`
	DependencyHashes    []map[string]interface{} `json:"dependency_hashes,omitempty"`
	Imports             map[string]interface{}   `json:"imports,omitempty"`
	LongDescription     string                   `json:"long_description,omitempty"`
	Mappings            map[string]interface{}   `json:"mappings,omitempty"`
	Name                string                   `json:"name,omitempty"`
	Namespaces          []*Namespace             `json:"namespaces,omitempty"`
	Operations          map[string]interface{}   `json:"operations,omitempty"`
	Outputs             map[string]interface{}   `json:"outputs,omitempty"`
	Package             string                   `json:"package,omitempty"`
	Parameters          map[string]interface{}   `json:"parameters,omitempty"`
	Permissions         map[string]interface{}   `json:"permissions,omitempty"`
	RequiredParameters  []string                 `json:"required_parameters,omitempty"`
	Resources           map[string]interface{}   `json:"resources,omitempty"`
	RsCaVer             int                      `json:"rs_ca_ver,omitempty"`
	ShortDescription    string                   `json:"short_description,omitempty"`
	Source              string                   `json:"source,omitempty"`
}

type ConfigurationOption

type ConfigurationOption struct {
	Name  string      `json:"name,omitempty"`
	Type_ string      `json:"type,omitempty"`
	Value interface{} `json:"value,omitempty"`
}

type EndUser

type EndUser struct {
	Company      string `json:"company,omitempty"`
	FirstName    string `json:"first_name,omitempty"`
	Href         string `json:"href,omitempty"`
	Id           string `json:"id,omitempty"`
	Kind         string `json:"kind,omitempty"`
	LastName     string `json:"last_name,omitempty"`
	Phone        string `json:"phone,omitempty"`
	TimezoneName string `json:"timezone_name,omitempty"`
}

func (*EndUser) Locator

func (r *EndUser) Locator(api *API) *EndUserLocator

Locator returns a locator for the given resource

type EndUserLocator

type EndUserLocator struct {
	Href
	// contains filtered or unexported fields
}

EndUserLocator exposes the EndUser resource actions.

func (*EndUserLocator) Create

func (loc *EndUserLocator) Create(userIds []string) error

POST /api/catalog/accounts/:account_id/end_users

Grant a user Self-Service Only End User access to this account.

func (*EndUserLocator) Delete

func (loc *EndUserLocator) Delete(userIds []string) error

func (*EndUserLocator) Index

func (loc *EndUserLocator) Index(options rsapi.APIParams) ([]*EndUser, error)

GET /api/catalog/accounts/:account_id/end_users

Show all Self-Service Only End Users that belong to this account.

func (*EndUserLocator) NonSsUsers

func (loc *EndUserLocator) NonSsUsers() (*EndUser, error)

type Href

type Href string

An Href contains the relative path to a resource or resource collection, e.g. "/api/servers/123" or "/api/servers".

func (*Href) ActionPath

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

ActionPath computes the path to the given resource action. For example given the href "/api/servers/123" calling ActionPath with resource "servers" and action "clone" returns the path "/api/servers/123/clone" and verb POST. The algorithm consists of extracting the variables from the href by looking up a matching pattern from the resource metadata. The variables are then substituted in the action path. If there are more than one pattern that match the href then the algorithm picks the one that can substitute the most variables.

type Namespace

type Namespace struct {
	Name    string            `json:"name,omitempty"`
	Service *NamespaceService `json:"service,omitempty"`
	Types   []*NamespaceType  `json:"types,omitempty"`
}

type NamespaceService

type NamespaceService struct {
	Auth    string                 `json:"auth,omitempty"`
	Headers map[string]interface{} `json:"headers,omitempty"`
	Host    string                 `json:"host,omitempty"`
	Path    string                 `json:"path,omitempty"`
}

type NamespaceType

type NamespaceType struct {
	Delete    string                 `json:"delete,omitempty"`
	Fields    map[string]interface{} `json:"fields,omitempty"`
	Name      string                 `json:"name,omitempty"`
	Path      string                 `json:"path,omitempty"`
	Provision string                 `json:"provision,omitempty"`
}

type NotificationRule

type NotificationRule struct {
	AccountId   string            `json:"account_id,omitempty"`
	Category    string            `json:"category,omitempty"`
	Href        string            `json:"href,omitempty"`
	Id          string            `json:"id,omitempty"`
	Kind        string            `json:"kind,omitempty"`
	MinSeverity string            `json:"min_severity,omitempty"`
	Priority    int               `json:"priority,omitempty"`
	Source      string            `json:"source,omitempty"`
	Target      string            `json:"target,omitempty"`
	Timestamps  *TimestampsStruct `json:"timestamps,omitempty"`
}

A notification rule describes which notification should be created when events occur in the system. Events may be generated when an execution status changes or when an operation fails for example. A rule has a source which can be a specific resource or a group of resources (described via a link-like syntax), a target which corresponds to a user (for now) and a minimum severity used to filter out events with lower severities.

func (*NotificationRule) Locator

func (r *NotificationRule) Locator(api *API) *NotificationRuleLocator

Locator returns a locator for the given resource

type NotificationRuleLocator

type NotificationRuleLocator struct {
	Href
	// contains filtered or unexported fields
}

NotificationRuleLocator exposes the NotificationRule resource actions.

func (*NotificationRuleLocator) Create

func (loc *NotificationRuleLocator) Create(minSeverity string, source string, target string, options rsapi.APIParams) (*NotificationRuleLocator, error)

POST /api/catalog/accounts/:account_id/notification_rules

Create one notification rule for a specific target and source. The source must be unique in the scope of target and account.

func (*NotificationRuleLocator) Delete

func (loc *NotificationRuleLocator) Delete() error

DELETE /api/catalog/accounts/:account_id/notification_rules/:id

Delete one notification rule.

func (*NotificationRuleLocator) Index

func (loc *NotificationRuleLocator) Index(source string, options rsapi.APIParams) ([]*NotificationRule, error)

GET /api/catalog/accounts/:account_id/notification_rules

List all notification rules, potentially filtering by a collection of resources.

func (*NotificationRuleLocator) MultiDelete

func (loc *NotificationRuleLocator) MultiDelete(options rsapi.APIParams) error

DELETE /api/catalog/accounts/:account_id/notification_rules

Delete one or more notification rules by id or source and target.

func (*NotificationRuleLocator) Patch

func (loc *NotificationRuleLocator) Patch(minSeverity string) error

PATCH /api/catalog/accounts/:account_id/notification_rules/:id

Change min severity of existing rule

func (*NotificationRuleLocator) Show

GET /api/catalog/accounts/:account_id/notification_rules/:id

Show one notification rule.

type Parameter

type Parameter struct {
	Default     interface{}                 `json:"default,omitempty"`
	Description string                      `json:"description,omitempty"`
	Name        string                      `json:"name,omitempty"`
	Operations  []interface{}               `json:"operations,omitempty"`
	Type_       string                      `json:"type,omitempty"`
	Ui          *ParametersUiStruct         `json:"ui,omitempty"`
	Validation  *ParametersValidationStruct `json:"validation,omitempty"`
}

type ParametersUiStruct

type ParametersUiStruct struct {
	Category string `json:"category,omitempty"`
	Index    int    `json:"index,omitempty"`
	Label    string `json:"label,omitempty"`
}

type ParametersValidationStruct

type ParametersValidationStruct struct {
	AllowedPattern        string        `json:"allowed_pattern,omitempty"`
	AllowedValues         []interface{} `json:"allowed_values,omitempty"`
	ConstraintDescription string        `json:"constraint_description,omitempty"`
	MaxLength             int           `json:"max_length,omitempty"`
	MaxValue              int           `json:"max_value,omitempty"`
	MinLength             int           `json:"min_length,omitempty"`
	MinValue              int           `json:"min_value,omitempty"`
	NoEcho                bool          `json:"no_echo,omitempty"`
}

type Recurrence

type Recurrence struct {
	Hour   int    `json:"hour,omitempty"`
	Minute int    `json:"minute,omitempty"`
	Rule   string `json:"rule,omitempty"`
}

type Schedule

type Schedule struct {
	CreatedFrom     string      `json:"created_from,omitempty"`
	Description     string      `json:"description,omitempty"`
	Name            string      `json:"name,omitempty"`
	StartRecurrence *Recurrence `json:"start_recurrence,omitempty"`
	StopRecurrence  *Recurrence `json:"stop_recurrence,omitempty"`
}

type TemplateInfo

type TemplateInfo struct {
	Href string `json:"href,omitempty"`
	Name string `json:"name,omitempty"`
}

type TimestampsStruct

type TimestampsStruct struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

type User

type User struct {
	Email string `json:"email,omitempty"`
	Id    int    `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
}

type UserPreference

type UserPreference struct {
	CreatedBy          *User               `json:"created_by,omitempty"`
	Href               string              `json:"href,omitempty"`
	Id                 string              `json:"id,omitempty"`
	Kind               string              `json:"kind,omitempty"`
	Timestamps         *TimestampsStruct   `json:"timestamps,omitempty"`
	UserId             int                 `json:"user_id,omitempty"`
	UserPreferenceInfo *UserPreferenceInfo `json:"user_preference_info,omitempty"`
	Value              string              `json:"value,omitempty"`
}

The UserPreference resource stores preferences on a per user basis, such as default notification preference. The Self-Service portal uses these preferences in the portal.

func (*UserPreference) Locator

func (r *UserPreference) Locator(api *API) *UserPreferenceLocator

Locator returns a locator for the given resource

type UserPreferenceInfo

type UserPreferenceInfo struct {
	Category        string            `json:"category,omitempty"`
	DefaultValue    string            `json:"default_value,omitempty"`
	DisplayName     string            `json:"display_name,omitempty"`
	HelpText        string            `json:"help_text,omitempty"`
	Href            string            `json:"href,omitempty"`
	Id              string            `json:"id,omitempty"`
	Kind            string            `json:"kind,omitempty"`
	Name            string            `json:"name,omitempty"`
	ValueConstraint []string          `json:"value_constraint,omitempty"`
	ValueRange      *ValueRangeStruct `json:"value_range,omitempty"`
	ValueType       string            `json:"value_type,omitempty"`
}

The UserPreferenceInfo resource defines the available user preferences supported by the system. It is also used to validate values saved in UserPreference.

func (*UserPreferenceInfo) Locator

Locator returns a locator for the given resource

type UserPreferenceInfoLocator

type UserPreferenceInfoLocator struct {
	Href
	// contains filtered or unexported fields
}

UserPreferenceInfoLocator exposes the UserPreferenceInfo resource actions.

func (*UserPreferenceInfoLocator) Index

GET /api/catalog/accounts/:account_id/user_preference_infos

List the UserPreferenceInfo.

func (*UserPreferenceInfoLocator) Show

GET /api/catalog/accounts/:account_id/user_preference_infos/:id

Get details for a particular UserPreferenceInfo

type UserPreferenceInfoParam

type UserPreferenceInfoParam struct {
	Category        string                              `json:"category,omitempty"`
	DefaultValue    string                              `json:"default_value,omitempty"`
	DisplayName     string                              `json:"display_name,omitempty"`
	HelpText        string                              `json:"help_text,omitempty"`
	Href            string                              `json:"href,omitempty"`
	Id              string                              `json:"id,omitempty"`
	Kind            string                              `json:"kind,omitempty"`
	Name            string                              `json:"name,omitempty"`
	ValueConstraint []string                            `json:"value_constraint,omitempty"`
	ValueRange      *UserPreferenceInfoValueRangeStruct `json:"value_range,omitempty"`
	ValueType       string                              `json:"value_type,omitempty"`
}

type UserPreferenceInfoValueRangeStruct

type UserPreferenceInfoValueRangeStruct struct {
	Max int `json:"max,omitempty"`
	Min int `json:"min,omitempty"`
}

type UserPreferenceLocator

type UserPreferenceLocator struct {
	Href
	// contains filtered or unexported fields
}

UserPreferenceLocator exposes the UserPreference resource actions.

func (*UserPreferenceLocator) Create

func (loc *UserPreferenceLocator) Create(userId string, userPreferenceInfoId string, value interface{}) (*UserPreferenceLocator, error)

POST /api/catalog/accounts/:account_id/user_preferences

Create a new UserPreference. Multiple resources can be created at once with a multipart request. Values are validated with the corresponding UserPreferenceInfo.

func (*UserPreferenceLocator) Delete

func (loc *UserPreferenceLocator) Delete() error

DELETE /api/catalog/accounts/:account_id/user_preferences/:id

Delete a UserPreference

func (*UserPreferenceLocator) Index

func (loc *UserPreferenceLocator) Index(options rsapi.APIParams) ([]*UserPreference, error)

GET /api/catalog/accounts/:account_id/user_preferences

List the UserPreference for users in this account. Only administrators and infrastructure users may request the preferences of other users. Users who are not members of the admin role need to specify a filter with their ID in order to retrieve their preferences.

func (*UserPreferenceLocator) Show

func (loc *UserPreferenceLocator) Show(options rsapi.APIParams) (*UserPreference, error)

GET /api/catalog/accounts/:account_id/user_preferences/:id

Get details for a particular UserPreference

func (*UserPreferenceLocator) Update

func (loc *UserPreferenceLocator) Update(value interface{}, options rsapi.APIParams) error

PATCH /api/catalog/accounts/:account_id/user_preferences/:id

Update the value of a UserPreference. Multiple values may be updated using a multipart request. Values are validated with the corresponding UserPreferenceInfo.

type ValueRangeStruct

type ValueRangeStruct struct {
	Max int `json:"max,omitempty"`
	Min int `json:"min,omitempty"`
}

Jump to

Keyboard shortcuts

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