Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (api *API) AccountPreferenceLocator(href string) *AccountPreferenceLocator
- func (api *API) ApplicationLocator(href string) *ApplicationLocator
- func (a *API) BuildHTTPRequest(verb, path, version string, params, payload rsapi.APIParams) (*http.Request, error)
- func (api *API) NotificationRuleLocator(href string) *NotificationRuleLocator
- func (api *API) UserPreferenceInfoLocator(href string) *UserPreferenceInfoLocator
- func (api *API) UserPreferenceLocator(href string) *UserPreferenceLocator
- type AccountPreference
- type AccountPreferenceLocator
- func (loc *AccountPreferenceLocator) Create(groupName string, name string, value string) (*AccountPreferenceLocator, error)
- func (loc *AccountPreferenceLocator) Delete() error
- func (loc *AccountPreferenceLocator) Index(options rsapi.APIParams) ([]*AccountPreference, error)
- func (loc *AccountPreferenceLocator) Show() (*AccountPreference, error)
- type Application
- type ApplicationLocator
- func (loc *ApplicationLocator) Create(compiledCat *CompiledCAT, name string, shortDescription string, ...) (*ApplicationLocator, error)
- func (loc *ApplicationLocator) Delete() error
- func (loc *ApplicationLocator) Download(apiVersion string) error
- func (loc *ApplicationLocator) Index(options rsapi.APIParams) ([]*Application, error)
- func (loc *ApplicationLocator) Launch(options rsapi.APIParams) error
- func (loc *ApplicationLocator) MultiDelete(ids []string) error
- func (loc *ApplicationLocator) MultiUpdate(id string, options rsapi.APIParams) error
- func (loc *ApplicationLocator) Show(options rsapi.APIParams) (*Application, error)
- func (loc *ApplicationLocator) Update(options rsapi.APIParams) error
- type CompiledCAT
- type ConfigurationOption
- type Href
- type Namespace
- type NamespaceService
- type NamespaceType
- type NotificationRule
- type NotificationRuleLocator
- func (loc *NotificationRuleLocator) Create(minSeverity string, source string, target string, options rsapi.APIParams) (*NotificationRuleLocator, error)
- func (loc *NotificationRuleLocator) Delete() error
- func (loc *NotificationRuleLocator) Index(source string, options rsapi.APIParams) ([]*NotificationRule, error)
- func (loc *NotificationRuleLocator) MultiDelete(options rsapi.APIParams) error
- func (loc *NotificationRuleLocator) Patch(minSeverity string) error
- func (loc *NotificationRuleLocator) Show() (*NotificationRule, error)
- type Parameter
- type ParametersUiStruct
- type ParametersValidationStruct
- type Recurrence
- type Schedule
- type TemplateInfo
- type TimestampsStruct
- type User
- type UserPreference
- type UserPreferenceInfo
- type UserPreferenceInfoLocator
- type UserPreferenceInfoParam
- type UserPreferenceInfoValueRangeStruct
- type UserPreferenceLocator
- func (loc *UserPreferenceLocator) Create(userId string, userPreferenceInfoId string, value interface{}) (*UserPreferenceLocator, error)
- func (loc *UserPreferenceLocator) Delete() error
- func (loc *UserPreferenceLocator) Index(options rsapi.APIParams) ([]*UserPreference, error)
- func (loc *UserPreferenceLocator) Show(options rsapi.APIParams) (*UserPreference, error)
- func (loc *UserPreferenceLocator) Update(value interface{}, options rsapi.APIParams) error
- type ValueRangeStruct
Constants ¶
const APIVersion = "1.0"
API Version
Variables ¶
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: "/accounts/%s/account_preferences", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/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, }, &metadata.ActionParam{ Name: "group", Description: `The group that this setting belongs to, simply for organizational purposes`, 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.ActionParam{ Name: "group", Description: `The group that this setting belongs to, simply for organizational purposes`, 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: "/accounts/%s/account_preferences/%s", Variables: []string{"account_id", "name"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/account_preferences", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/account_preferences/%s", Variables: []string{"account_id", "name"}, Regexp: regexp.MustCompile(`/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: "/catalogs/%s/applications", Variables: []string{"catalog_id"}, Regexp: regexp.MustCompile(`/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: "/catalogs/%s/applications/%s", Variables: []string{"catalog_id", "id"}, Regexp: regexp.MustCompile(`/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: "/catalogs/%s/applications", Variables: []string{"catalog_id"}, Regexp: regexp.MustCompile(`/catalogs/([^/]+)/applications`), }, }, CommandFlags: []*metadata.ActionParam{ &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[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: true, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[name]", Description: ``, Type: "string", Location: metadata.PayloadParam, Mandatory: true, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][auth]", Description: `Authorization information`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][headers]", Description: `Optional additional request headers`, Type: "map", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][host]", Description: `Service hostname`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][path]", Description: `Requests base path`, Type: "string", 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[parameters]", Description: ``, Type: "map", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[name]", Description: ``, Type: "string", Location: metadata.PayloadParam, Mandatory: true, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][auth]", Description: `Authorization information`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][headers]", Description: `Optional additional request headers`, Type: "map", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][host]", Description: `Service hostname`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][path]", Description: `Requests base path`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[resources]", Description: ``, Type: "map", Location: metadata.PayloadParam, Mandatory: true, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[rs_ca_ver]", Description: ``, Type: "int", Location: metadata.PayloadParam, Mandatory: true, 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: 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: 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: 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: 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: "/catalogs/%s/applications/%s", Variables: []string{"catalog_id", "id"}, Regexp: regexp.MustCompile(`/catalogs/([^/]+)/applications/([^/]+)`), }, }, CommandFlags: []*metadata.ActionParam{ &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[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[name]", Description: ``, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][auth]", Description: `Authorization information`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][headers]", Description: `Optional additional request headers`, Type: "map", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][host]", Description: `Service hostname`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][path]", Description: `Requests base path`, Type: "string", 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[parameters]", 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[namespaces][][service][auth]", Description: `Authorization information`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][headers]", Description: `Optional additional request headers`, Type: "map", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][host]", Description: `Service hostname`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][path]", Description: `Requests base path`, Type: "string", 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: "/catalogs/%s/applications", Variables: []string{"catalog_id"}, Regexp: regexp.MustCompile(`/catalogs/([^/]+)/applications`), }, }, CommandFlags: []*metadata.ActionParam{ &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[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[name]", Description: ``, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][auth]", Description: `Authorization information`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][headers]", Description: `Optional additional request headers`, Type: "map", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][host]", Description: `Service hostname`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][path]", Description: `Requests base path`, Type: "string", 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[parameters]", 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[namespaces][][service][auth]", Description: `Authorization information`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][headers]", Description: `Optional additional request headers`, Type: "map", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][host]", Description: `Service hostname`, Type: "string", Location: metadata.PayloadParam, Mandatory: false, NonBlank: false, }, &metadata.ActionParam{ Name: "compiled_cat[namespaces][][service][path]", Description: `Requests base path`, Type: "string", 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: "/catalogs/%s/applications/%s", Variables: []string{"catalog_id", "id"}, Regexp: regexp.MustCompile(`/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: "/catalogs/%s/applications", Variables: []string{"catalog_id"}, Regexp: regexp.MustCompile(`/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: "/catalogs/%s/applications/%s/download", Variables: []string{"catalog_id", "id"}, Regexp: regexp.MustCompile(`/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: "/catalogs/%s/applications/%s/actions/launch", Variables: []string{"catalog_id", "id"}, Regexp: regexp.MustCompile(`/catalogs/([^/]+)/applications/([^/]+)/actions/launch`), }, }, CommandFlags: []*metadata.ActionParam{ &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: "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, }, }, }, }, }, "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: "/accounts/%s/notification_rules", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/accounts/([^/]+)/notification_rules`), }, }, CommandFlags: []*metadata.ActionParam{ &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: "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: "/accounts/%s/notification_rules", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/accounts/([^/]+)/notification_rules`), }, }, CommandFlags: []*metadata.ActionParam{ &metadata.ActionParam{ Name: "filter[]", Description: ``, Type: "[]string", Location: metadata.QueryParam, Mandatory: false, NonBlank: false, }, &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: "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: "/accounts/%s/notification_rules/%s", Variables: []string{"account_id", "id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/notification_rules/%s", Variables: []string{"account_id", "id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/notification_rules/%s", Variables: []string{"account_id", "id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/notification_rules", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/user_preferences", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/user_preferences/%s", Variables: []string{"account_id", "id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/user_preferences", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/user_preferences/%s", Variables: []string{"account_id", "id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/user_preferences/%s", Variables: []string{"account_id", "id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/user_preference_infos", Variables: []string{"account_id"}, Regexp: regexp.MustCompile(`/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: "/accounts/%s/user_preference_infos/%s", Variables: []string{"account_id", "id"}, Regexp: regexp.MustCompile(`/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 ¶
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) BuildHTTPRequest ¶
func (a *API) BuildHTTPRequest(verb, path, version string, params, payload rsapi.APIParams) (*http.Request, error)
BuildHTTPRequest wraps the underlying rsapi implementation and simply prefixes the path with the service catalog path.
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 ¶
func (r *AccountPreference) Locator(api *API) *AccountPreferenceLocator
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 /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 /accounts/:account_id/account_preferences/:name
Delete an AccountPreference
func (*AccountPreferenceLocator) Index ¶
func (loc *AccountPreferenceLocator) Index(options rsapi.APIParams) ([]*AccountPreference, error)
GET /accounts/:account_id/account_preferences
List the AccountPreferences for this account.
func (*AccountPreferenceLocator) Show ¶
func (loc *AccountPreferenceLocator) Show() (*AccountPreference, error)
GET /accounts/:account_id/account_preferences/:name
Get details for a particular AccountPreference
type Application ¶
type Application struct { CompiledCat string `json:"compiled_cat,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(compiledCat *CompiledCAT, name string, shortDescription string, options rsapi.APIParams) (*ApplicationLocator, error)
POST /catalogs/:catalog_id/applications
Create a new Application in the Catalog.
func (*ApplicationLocator) Delete ¶
func (loc *ApplicationLocator) Delete() error
DELETE /catalogs/:catalog_id/applications/:id
Delete an Application from the Catalog
func (*ApplicationLocator) Download ¶
func (loc *ApplicationLocator) Download(apiVersion string) error
GET /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 /catalogs/:catalog_id/applications
List the Applications available in the specified Catalog.
func (*ApplicationLocator) Launch ¶
func (loc *ApplicationLocator) Launch(options rsapi.APIParams) error
POST /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 /catalogs/:catalog_id/applications
Delete multiple Applications from the Catalog
func (*ApplicationLocator) MultiUpdate ¶
func (loc *ApplicationLocator) MultiUpdate(id string, options rsapi.APIParams) error
PUT /catalogs/:catalog_id/applications
Update the content of multiple Applications.
func (*ApplicationLocator) Show ¶
func (loc *ApplicationLocator) Show(options rsapi.APIParams) (*Application, error)
GET /catalogs/:catalog_id/applications/:id
Show detailed information about a given Application.
type CompiledCAT ¶
type CompiledCAT struct { Conditions map[string]interface{} `json:"conditions,omitempty"` Definitions map[string]interface{} `json:"definitions,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"` Parameters map[string]interface{} `json:"parameters,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 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 NamespaceType ¶
type NotificationRule ¶
type NotificationRule struct { AccountId string `json:"account_id,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 /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 /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 /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 /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 /accounts/:account_id/notification_rules/:id
Change min severity of existing rule
func (*NotificationRuleLocator) Show ¶
func (loc *NotificationRuleLocator) Show() (*NotificationRule, error)
GET /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 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 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 TimestampsStruct ¶
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 ¶
func (r *UserPreferenceInfo) Locator(api *API) *UserPreferenceInfoLocator
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 ¶
func (loc *UserPreferenceInfoLocator) Index(options rsapi.APIParams) ([]*UserPreferenceInfo, error)
GET /accounts/:account_id/user_preference_infos
List the UserPreferenceInfo.
func (*UserPreferenceInfoLocator) Show ¶
func (loc *UserPreferenceInfoLocator) Show() (*UserPreferenceInfo, error)
GET /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 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 /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 /accounts/:account_id/user_preferences/:id
Delete a UserPreference
func (*UserPreferenceLocator) Index ¶
func (loc *UserPreferenceLocator) Index(options rsapi.APIParams) ([]*UserPreference, error)
GET /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 /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 /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.