keyvault

package
v10.0.1-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: Apache-2.0 Imports: 6 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 (
	// 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      *string      `json:"objectId,omitempty"`
	ApplicationID *uuid.UUID   `json:"applicationId,omitempty"`
	Permissions   *Permissions `json:"permissions,omitempty"`
}

AccessPolicyEntry is an identity 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 CertificatePermissions

type CertificatePermissions string

CertificatePermissions enumerates the values for certificate permissions.

const (
	// All specifies the all state for certificate permissions.
	All CertificatePermissions = "all"
	// Create specifies the create state for certificate permissions.
	Create CertificatePermissions = "create"
	// Delete specifies the delete state for certificate permissions.
	Delete CertificatePermissions = "delete"
	// Deleteissuers specifies the deleteissuers state for certificate
	// permissions.
	Deleteissuers CertificatePermissions = "deleteissuers"
	// Get specifies the get state for certificate permissions.
	Get CertificatePermissions = "get"
	// Getissuers specifies the getissuers state for certificate permissions.
	Getissuers CertificatePermissions = "getissuers"
	// Import specifies the import state for certificate permissions.
	Import CertificatePermissions = "import"
	// List specifies the list state for certificate permissions.
	List CertificatePermissions = "list"
	// Listissuers specifies the listissuers state for certificate permissions.
	Listissuers CertificatePermissions = "listissuers"
	// Managecontacts specifies the managecontacts state for certificate
	// permissions.
	Managecontacts CertificatePermissions = "managecontacts"
	// Manageissuers specifies the manageissuers state for certificate
	// permissions.
	Manageissuers CertificatePermissions = "manageissuers"
	// Setissuers specifies the setissuers state for certificate permissions.
	Setissuers CertificatePermissions = "setissuers"
	// Update specifies the update state for certificate permissions.
	Update CertificatePermissions = "update"
)

type KeyPermissions

type KeyPermissions string

KeyPermissions enumerates the values for key permissions.

const (
	// KeyPermissionsAll specifies the key permissions all state for key
	// permissions.
	KeyPermissionsAll KeyPermissions = "all"
	// KeyPermissionsBackup specifies the key permissions backup state for key
	// permissions.
	KeyPermissionsBackup KeyPermissions = "backup"
	// KeyPermissionsCreate specifies the key permissions create state for key
	// permissions.
	KeyPermissionsCreate KeyPermissions = "create"
	// KeyPermissionsDecrypt specifies the key permissions decrypt state for
	// key permissions.
	KeyPermissionsDecrypt KeyPermissions = "decrypt"
	// KeyPermissionsDelete specifies the key permissions delete state for key
	// permissions.
	KeyPermissionsDelete KeyPermissions = "delete"
	// KeyPermissionsEncrypt specifies the key permissions encrypt state for
	// key permissions.
	KeyPermissionsEncrypt KeyPermissions = "encrypt"
	// KeyPermissionsGet specifies the key permissions get state for key
	// permissions.
	KeyPermissionsGet KeyPermissions = "get"
	// KeyPermissionsImport specifies the key permissions import state for key
	// permissions.
	KeyPermissionsImport KeyPermissions = "import"
	// KeyPermissionsList specifies the key permissions list state for key
	// permissions.
	KeyPermissionsList KeyPermissions = "list"
	// KeyPermissionsRestore specifies the key permissions restore state for
	// key permissions.
	KeyPermissionsRestore KeyPermissions = "restore"
	// KeyPermissionsSign specifies the key permissions sign state for key
	// permissions.
	KeyPermissionsSign KeyPermissions = "sign"
	// KeyPermissionsUnwrapKey specifies the key permissions unwrap key state
	// for key permissions.
	KeyPermissionsUnwrapKey KeyPermissions = "unwrapKey"
	// KeyPermissionsUpdate specifies the key permissions update state for key
	// permissions.
	KeyPermissionsUpdate KeyPermissions = "update"
	// KeyPermissionsVerify specifies the key permissions verify state for key
	// permissions.
	KeyPermissionsVerify KeyPermissions = "verify"
	// KeyPermissionsWrapKey specifies the key permissions wrap key state for
	// key permissions.
	KeyPermissionsWrapKey KeyPermissions = "wrapKey"
)

type ManagementClient

type ManagementClient struct {
	autorest.Client
	BaseURI        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"`
	Certificates *[]CertificatePermissions `json:"certificates,omitempty"`
}

Permissions is permissions the identity has for keys, secrets and certificates.

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 ResourceListResult

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

ResourceListResult is list of vault resources.

func (ResourceListResult) ResourceListResultPreparer

func (client ResourceListResult) ResourceListResultPreparer() (*http.Request, error)

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

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 ResourceListResult, 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 ResourceListResult) (result ResourceListResult, 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 ResourceListResult, 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