keyvault

package
v11.2.1-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package keyvault implements the Azure ARM Keyvault service API version 2016-10-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 (
	// 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"
	// Purge specifies the purge state for certificate permissions.
	Purge CertificatePermissions = "purge"
	// Recover specifies the recover state for certificate permissions.
	Recover CertificatePermissions = "recover"
	// Setissuers specifies the setissuers state for certificate permissions.
	Setissuers CertificatePermissions = "setissuers"
	// Update specifies the update state for certificate permissions.
	Update CertificatePermissions = "update"
)

type CreateMode

type CreateMode string

CreateMode enumerates the values for create mode.

const (
	// CreateModeDefault specifies the create mode default state for create mode.
	CreateModeDefault CreateMode = "default"
	// CreateModeRecover specifies the create mode recover state for create mode.
	CreateModeRecover CreateMode = "recover"
)

type DeletedVault

type DeletedVault struct {
	autorest.Response `json:"-"`
	ID                *string                 `json:"id,omitempty"`
	Name              *string                 `json:"name,omitempty"`
	Type              *string                 `json:"type,omitempty"`
	Properties        *DeletedVaultProperties `json:"properties,omitempty"`
}

DeletedVault is deleted vault information with extended details.

type DeletedVaultListResult

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

DeletedVaultListResult is list of vaults

func (DeletedVaultListResult) DeletedVaultListResultPreparer

func (client DeletedVaultListResult) DeletedVaultListResultPreparer() (*http.Request, error)

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

type DeletedVaultProperties

type DeletedVaultProperties struct {
	VaultID            *string             `json:"vaultId,omitempty"`
	Location           *string             `json:"location,omitempty"`
	DeletionDate       *date.Time          `json:"deletionDate,omitempty"`
	ScheduledPurgeDate *date.Time          `json:"scheduledPurgeDate,omitempty"`
	Tags               *map[string]*string `json:"tags,omitempty"`
}

DeletedVaultProperties is properties of the deleted vault.

type KeyPermissions

type KeyPermissions string

KeyPermissions enumerates the values for key permissions.

const (
	// 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"
	// KeyPermissionsPurge specifies the key permissions purge state for key permissions.
	KeyPermissionsPurge KeyPermissions = "purge"
	// KeyPermissionsRecover specifies the key permissions recover state for key permissions.
	KeyPermissionsRecover KeyPermissions = "recover"
	// 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"`
	Storage      *[]StoragePermissions     `json:"storage,omitempty"`
}

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

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 (
	// SecretPermissionsBackup specifies the secret permissions backup state for secret permissions.
	SecretPermissionsBackup SecretPermissions = "backup"
	// 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"
	// SecretPermissionsPurge specifies the secret permissions purge state for secret permissions.
	SecretPermissionsPurge SecretPermissions = "purge"
	// SecretPermissionsRecover specifies the secret permissions recover state for secret permissions.
	SecretPermissionsRecover SecretPermissions = "recover"
	// SecretPermissionsRestore specifies the secret permissions restore state for secret permissions.
	SecretPermissionsRestore SecretPermissions = "restore"
	// 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 StoragePermissions

type StoragePermissions string

StoragePermissions enumerates the values for storage permissions.

const (
	// StoragePermissionsDelete specifies the storage permissions delete state for storage permissions.
	StoragePermissionsDelete StoragePermissions = "delete"
	// StoragePermissionsDeletesas specifies the storage permissions deletesas state for storage permissions.
	StoragePermissionsDeletesas StoragePermissions = "deletesas"
	// StoragePermissionsGet specifies the storage permissions get state for storage permissions.
	StoragePermissionsGet StoragePermissions = "get"
	// StoragePermissionsGetsas specifies the storage permissions getsas state for storage permissions.
	StoragePermissionsGetsas StoragePermissions = "getsas"
	// StoragePermissionsList specifies the storage permissions list state for storage permissions.
	StoragePermissionsList StoragePermissions = "list"
	// StoragePermissionsListsas specifies the storage permissions listsas state for storage permissions.
	StoragePermissionsListsas StoragePermissions = "listsas"
	// StoragePermissionsRegeneratekey specifies the storage permissions regeneratekey state for storage permissions.
	StoragePermissionsRegeneratekey StoragePermissions = "regeneratekey"
	// StoragePermissionsSet specifies the storage permissions set state for storage permissions.
	StoragePermissionsSet StoragePermissions = "set"
	// StoragePermissionsSetsas specifies the storage permissions setsas state for storage permissions.
	StoragePermissionsSetsas StoragePermissions = "setsas"
	// StoragePermissionsUpdate specifies the storage permissions update state for storage permissions.
	StoragePermissionsUpdate StoragePermissions = "update"
)

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 {
	TenantID                     *uuid.UUID           `json:"tenantId,omitempty"`
	Sku                          *Sku                 `json:"sku,omitempty"`
	AccessPolicies               *[]AccessPolicyEntry `json:"accessPolicies,omitempty"`
	VaultURI                     *string              `json:"vaultUri,omitempty"`
	EnabledForDeployment         *bool                `json:"enabledForDeployment,omitempty"`
	EnabledForDiskEncryption     *bool                `json:"enabledForDiskEncryption,omitempty"`
	EnabledForTemplateDeployment *bool                `json:"enabledForTemplateDeployment,omitempty"`
	EnableSoftDelete             *bool                `json:"enableSoftDelete,omitempty"`
	CreateMode                   CreateMode           `json:"createMode,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) GetDeleted

func (client VaultsClient) GetDeleted(vaultName string, location string) (result DeletedVault, err error)

GetDeleted gets the deleted Azure key vault.

vaultName is the name of the vault. location is the location of the deleted vault.

func (VaultsClient) GetDeletedPreparer

func (client VaultsClient) GetDeletedPreparer(vaultName string, location string) (*http.Request, error)

GetDeletedPreparer prepares the GetDeleted request.

func (VaultsClient) GetDeletedResponder

func (client VaultsClient) GetDeletedResponder(resp *http.Response) (result DeletedVault, err error)

GetDeletedResponder handles the response to the GetDeleted request. The method always closes the http.Response Body.

func (VaultsClient) GetDeletedSender

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

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

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) ListByResourceGroupComplete

func (client VaultsClient) ListByResourceGroupComplete(resourceGroupName string, top *int32, cancel <-chan struct{}) (<-chan Vault, <-chan error)

ListByResourceGroupComplete gets all elements from the list without paging.

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) ListComplete

func (client VaultsClient) ListComplete(filter string, top *int32, cancel <-chan struct{}) (<-chan Resource, <-chan error)

ListComplete gets all elements from the list without paging.

func (VaultsClient) ListDeleted

func (client VaultsClient) ListDeleted() (result DeletedVaultListResult, err error)

ListDeleted gets information about the deleted vaults in a subscription.

func (VaultsClient) ListDeletedComplete

func (client VaultsClient) ListDeletedComplete(cancel <-chan struct{}) (<-chan DeletedVault, <-chan error)

ListDeletedComplete gets all elements from the list without paging.

func (VaultsClient) ListDeletedNextResults

func (client VaultsClient) ListDeletedNextResults(lastResults DeletedVaultListResult) (result DeletedVaultListResult, err error)

ListDeletedNextResults retrieves the next set of results, if any.

func (VaultsClient) ListDeletedPreparer

func (client VaultsClient) ListDeletedPreparer() (*http.Request, error)

ListDeletedPreparer prepares the ListDeleted request.

func (VaultsClient) ListDeletedResponder

func (client VaultsClient) ListDeletedResponder(resp *http.Response) (result DeletedVaultListResult, err error)

ListDeletedResponder handles the response to the ListDeleted request. The method always closes the http.Response Body.

func (VaultsClient) ListDeletedSender

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

ListDeletedSender sends the ListDeleted 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.

func (VaultsClient) PurgeDeleted

func (client VaultsClient) PurgeDeleted(vaultName string, location string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error)

PurgeDeleted permanently deletes the specified vault. aka Purges the deleted Azure key vault. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.

vaultName is the name of the soft-deleted vault. location is the location of the soft-deleted vault.

func (VaultsClient) PurgeDeletedPreparer

func (client VaultsClient) PurgeDeletedPreparer(vaultName string, location string, cancel <-chan struct{}) (*http.Request, error)

PurgeDeletedPreparer prepares the PurgeDeleted request.

func (VaultsClient) PurgeDeletedResponder

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

PurgeDeletedResponder handles the response to the PurgeDeleted request. The method always closes the http.Response Body.

func (VaultsClient) PurgeDeletedSender

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

PurgeDeletedSender sends the PurgeDeleted 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