certificates

package
v0.20240110.1151535 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/certificates Documentation

The certificates SDK allows for interaction with the Azure Resource Manager Service web (API Version 2022-09-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/web/2022-09-01/certificates"

Client Initialization

client := certificates.NewCertificatesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CertificatesClient.CreateOrUpdate

ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "certificateValue")

payload := certificates.Certificate{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: CertificatesClient.Delete

ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "certificateValue")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: CertificatesClient.Get

ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "certificateValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: CertificatesClient.List

ctx := context.TODO()
id := certificates.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.List(ctx, id, certificates.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, certificates.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: CertificatesClient.ListByResourceGroup

ctx := context.TODO()
id := certificates.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: CertificatesClient.Update

ctx := context.TODO()
id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "certificateValue")

payload := certificates.CertificatePatchResource{
	// ...
}


read, err := client.Update(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForKeyVaultSecretStatus

func PossibleValuesForKeyVaultSecretStatus() []string

func ValidateCertificateID

func ValidateCertificateID(input interface{}, key string) (warnings []string, errors []error)

ValidateCertificateID checks that 'input' can be parsed as a Certificate ID

Types

type Certificate

type Certificate struct {
	Id         *string                `json:"id,omitempty"`
	Kind       *string                `json:"kind,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *CertificateProperties `json:"properties,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type CertificateId

type CertificateId struct {
	SubscriptionId    string
	ResourceGroupName string
	CertificateName   string
}

CertificateId is a struct representing the Resource ID for a Certificate

func NewCertificateID

func NewCertificateID(subscriptionId string, resourceGroupName string, certificateName string) CertificateId

NewCertificateID returns a new CertificateId struct

func ParseCertificateID

func ParseCertificateID(input string) (*CertificateId, error)

ParseCertificateID parses 'input' into a CertificateId

func ParseCertificateIDInsensitively

func ParseCertificateIDInsensitively(input string) (*CertificateId, error)

ParseCertificateIDInsensitively parses 'input' case-insensitively into a CertificateId note: this method should only be used for API response data and not user input

func (*CertificateId) FromParseResult added in v0.20231127.1171502

func (id *CertificateId) FromParseResult(input resourceids.ParseResult) error

func (CertificateId) ID

func (id CertificateId) ID() string

ID returns the formatted Certificate ID

func (CertificateId) Segments

func (id CertificateId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Certificate ID

func (CertificateId) String

func (id CertificateId) String() string

String returns a human-readable description of this Certificate ID

type CertificateOperationPredicate

type CertificateOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (CertificateOperationPredicate) Matches

type CertificatePatchResource

type CertificatePatchResource struct {
	Id         *string                             `json:"id,omitempty"`
	Kind       *string                             `json:"kind,omitempty"`
	Name       *string                             `json:"name,omitempty"`
	Properties *CertificatePatchResourceProperties `json:"properties,omitempty"`
	Type       *string                             `json:"type,omitempty"`
}

type CertificatePatchResourceProperties

type CertificatePatchResourceProperties struct {
	CanonicalName             *string                    `json:"canonicalName,omitempty"`
	CerBlob                   *string                    `json:"cerBlob,omitempty"`
	DomainValidationMethod    *string                    `json:"domainValidationMethod,omitempty"`
	ExpirationDate            *string                    `json:"expirationDate,omitempty"`
	FriendlyName              *string                    `json:"friendlyName,omitempty"`
	HostNames                 *[]string                  `json:"hostNames,omitempty"`
	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
	IssueDate                 *string                    `json:"issueDate,omitempty"`
	Issuer                    *string                    `json:"issuer,omitempty"`
	KeyVaultId                *string                    `json:"keyVaultId,omitempty"`
	KeyVaultSecretName        *string                    `json:"keyVaultSecretName,omitempty"`
	KeyVaultSecretStatus      *KeyVaultSecretStatus      `json:"keyVaultSecretStatus,omitempty"`
	Password                  *string                    `json:"password,omitempty"`
	PfxBlob                   *string                    `json:"pfxBlob,omitempty"`
	PublicKeyHash             *string                    `json:"publicKeyHash,omitempty"`
	SelfLink                  *string                    `json:"selfLink,omitempty"`
	ServerFarmId              *string                    `json:"serverFarmId,omitempty"`
	SiteName                  *string                    `json:"siteName,omitempty"`
	SubjectName               *string                    `json:"subjectName,omitempty"`
	Thumbprint                *string                    `json:"thumbprint,omitempty"`
	Valid                     *bool                      `json:"valid,omitempty"`
}

func (*CertificatePatchResourceProperties) GetExpirationDateAsTime

func (o *CertificatePatchResourceProperties) GetExpirationDateAsTime() (*time.Time, error)

func (*CertificatePatchResourceProperties) GetIssueDateAsTime

func (o *CertificatePatchResourceProperties) GetIssueDateAsTime() (*time.Time, error)

func (*CertificatePatchResourceProperties) SetExpirationDateAsTime

func (o *CertificatePatchResourceProperties) SetExpirationDateAsTime(input time.Time)

func (*CertificatePatchResourceProperties) SetIssueDateAsTime

func (o *CertificatePatchResourceProperties) SetIssueDateAsTime(input time.Time)

type CertificateProperties

type CertificateProperties struct {
	CanonicalName             *string                    `json:"canonicalName,omitempty"`
	CerBlob                   *string                    `json:"cerBlob,omitempty"`
	DomainValidationMethod    *string                    `json:"domainValidationMethod,omitempty"`
	ExpirationDate            *string                    `json:"expirationDate,omitempty"`
	FriendlyName              *string                    `json:"friendlyName,omitempty"`
	HostNames                 *[]string                  `json:"hostNames,omitempty"`
	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
	IssueDate                 *string                    `json:"issueDate,omitempty"`
	Issuer                    *string                    `json:"issuer,omitempty"`
	KeyVaultId                *string                    `json:"keyVaultId,omitempty"`
	KeyVaultSecretName        *string                    `json:"keyVaultSecretName,omitempty"`
	KeyVaultSecretStatus      *KeyVaultSecretStatus      `json:"keyVaultSecretStatus,omitempty"`
	Password                  *string                    `json:"password,omitempty"`
	PfxBlob                   *string                    `json:"pfxBlob,omitempty"`
	PublicKeyHash             *string                    `json:"publicKeyHash,omitempty"`
	SelfLink                  *string                    `json:"selfLink,omitempty"`
	ServerFarmId              *string                    `json:"serverFarmId,omitempty"`
	SiteName                  *string                    `json:"siteName,omitempty"`
	SubjectName               *string                    `json:"subjectName,omitempty"`
	Thumbprint                *string                    `json:"thumbprint,omitempty"`
	Valid                     *bool                      `json:"valid,omitempty"`
}

func (*CertificateProperties) GetExpirationDateAsTime

func (o *CertificateProperties) GetExpirationDateAsTime() (*time.Time, error)

func (*CertificateProperties) GetIssueDateAsTime

func (o *CertificateProperties) GetIssueDateAsTime() (*time.Time, error)

func (*CertificateProperties) SetExpirationDateAsTime

func (o *CertificateProperties) SetExpirationDateAsTime(input time.Time)

func (*CertificateProperties) SetIssueDateAsTime

func (o *CertificateProperties) SetIssueDateAsTime(input time.Time)

type CertificatesClient

type CertificatesClient struct {
	Client *resourcemanager.Client
}

func NewCertificatesClientWithBaseURI

func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error)

func (CertificatesClient) CreateOrUpdate

func (c CertificatesClient) CreateOrUpdate(ctx context.Context, id CertificateId, input Certificate) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (CertificatesClient) Delete

Delete ...

func (CertificatesClient) Get

Get ...

func (CertificatesClient) List

List ...

func (CertificatesClient) ListByResourceGroup

ListByResourceGroup ...

func (CertificatesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (CertificatesClient) ListByResourceGroupCompleteMatchingPredicate

func (c CertificatesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CertificateOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CertificatesClient) ListComplete

ListComplete retrieves all the results into a single object

func (CertificatesClient) ListCompleteMatchingPredicate

func (c CertificatesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate CertificateOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CertificatesClient) Update

Update ...

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Certificate
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Certificate
}

type HostingEnvironmentProfile

type HostingEnvironmentProfile struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type KeyVaultSecretStatus

type KeyVaultSecretStatus string
const (
	KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault KeyVaultSecretStatus = "AzureServiceUnauthorizedToAccessKeyVault"
	KeyVaultSecretStatusCertificateOrderFailed                   KeyVaultSecretStatus = "CertificateOrderFailed"
	KeyVaultSecretStatusExternalPrivateKey                       KeyVaultSecretStatus = "ExternalPrivateKey"
	KeyVaultSecretStatusInitialized                              KeyVaultSecretStatus = "Initialized"
	KeyVaultSecretStatusKeyVaultDoesNotExist                     KeyVaultSecretStatus = "KeyVaultDoesNotExist"
	KeyVaultSecretStatusKeyVaultSecretDoesNotExist               KeyVaultSecretStatus = "KeyVaultSecretDoesNotExist"
	KeyVaultSecretStatusOperationNotPermittedOnKeyVault          KeyVaultSecretStatus = "OperationNotPermittedOnKeyVault"
	KeyVaultSecretStatusSucceeded                                KeyVaultSecretStatus = "Succeeded"
	KeyVaultSecretStatusUnknown                                  KeyVaultSecretStatus = "Unknown"
	KeyVaultSecretStatusUnknownError                             KeyVaultSecretStatus = "UnknownError"
	KeyVaultSecretStatusWaitingOnCertificateOrder                KeyVaultSecretStatus = "WaitingOnCertificateOrder"
)

func (*KeyVaultSecretStatus) UnmarshalJSON added in v0.20230725.1205316

func (s *KeyVaultSecretStatus) UnmarshalJSON(bytes []byte) error

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Certificate
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Certificate
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Certificate
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230725.1205316

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20230725.1205316

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20230725.1205316

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Certificate
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Certificate
}

Jump to

Keyboard shortcuts

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