keyvault

package
v5.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package keyvault implements the Azure ARM Keyvault service API version 2015-06-01.

The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.

Index

Constants

View Source
const (
	// APIVersion is the version of the Keyvault
	APIVersion = "2015-06-01"

	// DefaultBaseURI is the default URI used for the service Keyvault
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type AccessPolicyEntry

type AccessPolicyEntry struct {
	TenantID      *uuid.UUID   `json:"tenantId,omitempty"`
	ObjectID      *uuid.UUID   `json:"objectId,omitempty"`
	ApplicationID *uuid.UUID   `json:"applicationId,omitempty"`
	Permissions   *Permissions `json:"permissions,omitempty"`
}

AccessPolicyEntry is an array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.

type KeyPermissions

type KeyPermissions string

KeyPermissions enumerates the values for key permissions.

const (
	// All specifies the all state for key permissions.
	All KeyPermissions = "all"
	// Backup specifies the backup state for key permissions.
	Backup KeyPermissions = "backup"
	// Create specifies the create state for key permissions.
	Create KeyPermissions = "create"
	// Decrypt specifies the decrypt state for key permissions.
	Decrypt KeyPermissions = "decrypt"
	// Delete specifies the delete state for key permissions.
	Delete KeyPermissions = "delete"
	// Encrypt specifies the encrypt state for key permissions.
	Encrypt KeyPermissions = "encrypt"
	// Get specifies the get state for key permissions.
	Get KeyPermissions = "get"
	// Import specifies the import state for key permissions.
	Import KeyPermissions = "import"
	// List specifies the list state for key permissions.
	List KeyPermissions = "list"
	// Restore specifies the restore state for key permissions.
	Restore KeyPermissions = "restore"
	// Sign specifies the sign state for key permissions.
	Sign KeyPermissions = "sign"
	// Unwrapkey specifies the unwrapkey state for key permissions.
	Unwrapkey KeyPermissions = "unwrapkey"
	// Update specifies the update state for key permissions.
	Update KeyPermissions = "update"
	// Verify specifies the verify state for key permissions.
	Verify KeyPermissions = "verify"
	// Wrapkey specifies the wrapkey state for key permissions.
	Wrapkey KeyPermissions = "wrapkey"
)

type ManagementClient

type ManagementClient struct {
	autorest.Client
	BaseURI        string
	APIVersion     string
	SubscriptionID string
}

ManagementClient is the base client for Keyvault.

func New

func New(subscriptionID string) ManagementClient

New creates an instance of the ManagementClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient

NewWithBaseURI creates an instance of the ManagementClient client.

type Permissions

type Permissions struct {
	Keys    *[]KeyPermissions    `json:"keys,omitempty"`
	Secrets *[]SecretPermissions `json:"secrets,omitempty"`
}

Permissions is permissions the identity has for keys and secrets

type Resource

type Resource struct {
	ID       *string             `json:"id,omitempty"`
	Name     *string             `json:"name,omitempty"`
	Type     *string             `json:"type,omitempty"`
	Location *string             `json:"location,omitempty"`
	Tags     *map[string]*string `json:"tags,omitempty"`
}

Resource is key Vault resource

type SecretPermissions

type SecretPermissions string

SecretPermissions enumerates the values for secret permissions.

const (
	// SecretPermissionsAll specifies the secret permissions all state for
	// secret permissions.
	SecretPermissionsAll SecretPermissions = "all"
	// SecretPermissionsDelete specifies the secret permissions delete state
	// for secret permissions.
	SecretPermissionsDelete SecretPermissions = "delete"
	// SecretPermissionsGet specifies the secret permissions get state for
	// secret permissions.
	SecretPermissionsGet SecretPermissions = "get"
	// SecretPermissionsList specifies the secret permissions list state for
	// secret permissions.
	SecretPermissionsList SecretPermissions = "list"
	// SecretPermissionsSet specifies the secret permissions set state for
	// secret permissions.
	SecretPermissionsSet SecretPermissions = "set"
)

type Sku

type Sku struct {
	Family *string `json:"family,omitempty"`
	Name   SkuName `json:"name,omitempty"`
}

Sku is sKU details

type SkuName

type SkuName string

SkuName enumerates the values for sku name.

const (
	// Premium specifies the premium state for sku name.
	Premium SkuName = "premium"
	// Standard specifies the standard state for sku name.
	Standard SkuName = "standard"
)

type Vault

type Vault struct {
	autorest.Response `json:"-"`
	ID                *string             `json:"id,omitempty"`
	Name              *string             `json:"name,omitempty"`
	Type              *string             `json:"type,omitempty"`
	Location          *string             `json:"location,omitempty"`
	Tags              *map[string]*string `json:"tags,omitempty"`
	Properties        *VaultProperties    `json:"properties,omitempty"`
}

Vault is resource information with extended details.

type VaultCreateOrUpdateParameters

type VaultCreateOrUpdateParameters struct {
	Location   *string             `json:"location,omitempty"`
	Tags       *map[string]*string `json:"tags,omitempty"`
	Properties *VaultProperties    `json:"properties,omitempty"`
}

VaultCreateOrUpdateParameters is parameters for creating or updating a vault

type VaultListResult

type VaultListResult struct {
	autorest.Response `json:"-"`
	Value             *[]Vault `json:"value,omitempty"`
	NextLink          *string  `json:"nextLink,omitempty"`
}

VaultListResult is list of vaults

func (VaultListResult) VaultListResultPreparer

func (client VaultListResult) VaultListResultPreparer() (*http.Request, error)

VaultListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.

type VaultProperties

type VaultProperties struct {
	VaultURI                     *string              `json:"vaultUri,omitempty"`
	TenantID                     *uuid.UUID           `json:"tenantId,omitempty"`
	Sku                          *Sku                 `json:"sku,omitempty"`
	AccessPolicies               *[]AccessPolicyEntry `json:"accessPolicies,omitempty"`
	EnabledForDeployment         *bool                `json:"enabledForDeployment,omitempty"`
	EnabledForDiskEncryption     *bool                `json:"enabledForDiskEncryption,omitempty"`
	EnabledForTemplateDeployment *bool                `json:"enabledForTemplateDeployment,omitempty"`
}

VaultProperties is properties of the vault

type VaultsClient

type VaultsClient struct {
	ManagementClient
}

VaultsClient is the the Azure management API provides a RESTful set of web services that interact with Azure Key Vault.

func NewVaultsClient

func NewVaultsClient(subscriptionID string) VaultsClient

NewVaultsClient creates an instance of the VaultsClient client.

func NewVaultsClientWithBaseURI

func NewVaultsClientWithBaseURI(baseURI string, subscriptionID string) VaultsClient

NewVaultsClientWithBaseURI creates an instance of the VaultsClient client.

func (VaultsClient) CreateOrUpdate

func (client VaultsClient) CreateOrUpdate(resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters) (result Vault, err error)

CreateOrUpdate create or update a key vault in the specified subscription.

resourceGroupName is the name of the Resource Group to which the server belongs. vaultName is name of the vault parameters is parameters to create or update the vault

func (VaultsClient) CreateOrUpdatePreparer

func (client VaultsClient) CreateOrUpdatePreparer(resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (VaultsClient) CreateOrUpdateResponder

func (client VaultsClient) CreateOrUpdateResponder(resp *http.Response) (result Vault, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (VaultsClient) CreateOrUpdateSender

func (client VaultsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (VaultsClient) Delete

func (client VaultsClient) Delete(resourceGroupName string, vaultName string) (result autorest.Response, err error)

Delete deletes the specified Azure key vault.

resourceGroupName is the name of the Resource Group to which the vault belongs. vaultName is the name of the vault to delete

func (VaultsClient) DeletePreparer

func (client VaultsClient) DeletePreparer(resourceGroupName string, vaultName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (VaultsClient) DeleteResponder

func (client VaultsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (VaultsClient) DeleteSender

func (client VaultsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (VaultsClient) Get

func (client VaultsClient) Get(resourceGroupName string, vaultName string) (result Vault, err error)

Get gets the specified Azure key vault.

resourceGroupName is the name of the Resource Group to which the vault belongs. vaultName is the name of the vault.

func (VaultsClient) GetPreparer

func (client VaultsClient) GetPreparer(resourceGroupName string, vaultName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (VaultsClient) GetResponder

func (client VaultsClient) GetResponder(resp *http.Response) (result Vault, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (VaultsClient) GetSender

func (client VaultsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (VaultsClient) List

func (client VaultsClient) List(filter string, top *int32) (result VaultListResult, err error)

List the List operation gets information about the vaults associated with the subscription.

filter is the filter to apply on the operation. top is maximum number of results to return.

func (VaultsClient) ListByResourceGroup

func (client VaultsClient) ListByResourceGroup(resourceGroupName string, top *int32) (result VaultListResult, err error)

ListByResourceGroup the List operation gets information about the vaults associated with the subscription and within the specified resource group.

resourceGroupName is the name of the Resource Group to which the vault belongs. top is maximum number of results to return.

func (VaultsClient) ListByResourceGroupNextResults

func (client VaultsClient) ListByResourceGroupNextResults(lastResults VaultListResult) (result VaultListResult, err error)

ListByResourceGroupNextResults retrieves the next set of results, if any.

func (VaultsClient) ListByResourceGroupPreparer

func (client VaultsClient) ListByResourceGroupPreparer(resourceGroupName string, top *int32) (*http.Request, error)

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (VaultsClient) ListByResourceGroupResponder

func (client VaultsClient) ListByResourceGroupResponder(resp *http.Response) (result VaultListResult, err error)

ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.

func (VaultsClient) ListByResourceGroupSender

func (client VaultsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)

ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.

func (VaultsClient) ListNextResults

func (client VaultsClient) ListNextResults(lastResults VaultListResult) (result VaultListResult, err error)

ListNextResults retrieves the next set of results, if any.

func (VaultsClient) ListPreparer

func (client VaultsClient) ListPreparer(filter string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (VaultsClient) ListResponder

func (client VaultsClient) ListResponder(resp *http.Response) (result VaultListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (VaultsClient) ListSender

func (client VaultsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

Jump to

Keyboard shortcuts

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