Documentation ¶
Index ¶
- type Client
- func (c *Client) AddCloud(cloud jujucloud.Cloud, force bool) error
- func (c *Client) AddCloudsCredentials(cloudCredentials map[string]jujucloud.Credential) ([]params.UpdateCredentialResult, error)
- func (c *Client) AddCredential(tag string, credential jujucloud.Credential) error
- func (c *Client) Cloud(tag names.CloudTag) (jujucloud.Cloud, error)
- func (c *Client) CloudInfo(tags []names.CloudTag) ([]CloudInfo, error)
- func (c *Client) Clouds() (map[names.CloudTag]jujucloud.Cloud, error)
- func (c *Client) CredentialContents(cloud, credential string, withSecrets bool) ([]params.CredentialContentResult, error)
- func (c *Client) Credentials(tags ...names.CloudCredentialTag) ([]params.CloudCredentialResult, error)
- func (c *Client) GrantCloud(user, access string, clouds ...string) error
- func (c *Client) RemoveCloud(cloud string) error
- func (c *Client) RevokeCloud(user, access string, clouds ...string) error
- func (c *Client) RevokeCredential(tag names.CloudCredentialTag, force bool) error
- func (c *Client) UpdateCloud(cloud jujucloud.Cloud) error
- func (c *Client) UpdateCloudsCredentials(cloudCredentials map[string]jujucloud.Credential, force bool) ([]params.UpdateCredentialResult, error)
- func (c *Client) UpdateCredentialsCheckModels(tag names.CloudCredentialTag, credential jujucloud.Credential) ([]params.UpdateCredentialModelResult, error)
- func (c *Client) UserCredentials(user names.UserTag, cloud names.CloudTag) ([]names.CloudCredentialTag, error)
- type CloudInfo
- type CloudUserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base.ClientFacade // contains filtered or unexported fields }
Client provides methods that the Juju client command uses to interact with models stored in the Juju Server.
func NewClient ¶
func NewClient(st base.APICallCloser) *Client
NewClient creates a new `Client` based on an existing authenticated API connection.
func (*Client) AddCloudsCredentials ¶
func (c *Client) AddCloudsCredentials(cloudCredentials map[string]jujucloud.Credential) ([]params.UpdateCredentialResult, error)
AddCloudsCredentials adds/uploads clouds credentials content to the controller. Passed in credentials are keyed on the credential tag.
func (*Client) AddCredential ¶
func (c *Client) AddCredential(tag string, credential jujucloud.Credential) error
AddCredential adds a credential to the controller with a given tag. This can be a credential for a cloud that is not the same cloud as the controller's host.
func (*Client) CloudInfo ¶
CloudInfo returns details and user access for the cloud with the given tag.
func (*Client) CredentialContents ¶
func (c *Client) CredentialContents(cloud, credential string, withSecrets bool) ([]params.CredentialContentResult, error)
CredentialContents returns contents of the credential values for the specified cloud and credential name. Secrets will be included if requested.
func (*Client) Credentials ¶
func (c *Client) Credentials(tags ...names.CloudCredentialTag) ([]params.CloudCredentialResult, error)
Credentials returns a slice of credential values for the specified tags. Secrets are excluded from the credential attributes.
func (*Client) GrantCloud ¶
GrantCloud grants a user access to a cloud.
func (*Client) RemoveCloud ¶
RemoveCloud removes a cloud from the current controller.
func (*Client) RevokeCloud ¶
RevokeCloud revokes a user's access to a cloud.
func (*Client) RevokeCredential ¶
RevokeCredential revokes/deletes a cloud credential.
func (*Client) UpdateCloud ¶
UpdateCloud updates an existing cloud on a current controller.
func (*Client) UpdateCloudsCredentials ¶
func (c *Client) UpdateCloudsCredentials(cloudCredentials map[string]jujucloud.Credential, force bool) ([]params.UpdateCredentialResult, error)
UpdateCloudsCredentials updates clouds credentials content on the controller. Passed in credentials are keyed on the credential tag. This operation can be forced to ignore validation checks.
func (*Client) UpdateCredentialsCheckModels ¶
func (c *Client) UpdateCredentialsCheckModels(tag names.CloudCredentialTag, credential jujucloud.Credential) ([]params.UpdateCredentialModelResult, error)
UpdateCredentialsCheckModels updates a cloud credential content stored on the controller. This call validates that the new content works for all models that are using this credential.
func (*Client) UserCredentials ¶
func (c *Client) UserCredentials(user names.UserTag, cloud names.CloudTag) ([]names.CloudCredentialTag, error)
UserCredentials returns the tags for cloud credentials available to a user for use with a specific cloud.
type CloudInfo ¶
type CloudInfo struct { jujucloud.Cloud Users map[string]CloudUserInfo }
CloudInfo holds cloud details and who can access the cloud.
type CloudUserInfo ¶
CloudUserInfo holds details of who can access a cloud.