certificate

package
v0.20230418.1121253 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/batch/2022-10-01/certificate Documentation

The certificate SDK allows for interaction with the Azure Resource Manager Service batch (API Version 2022-10-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/batch/2022-10-01/certificate"

Client Initialization

client := certificate.NewCertificateClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CertificateClient.CancelDeletion

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

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

Example Usage: CertificateClient.Create

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

payload := certificate.CertificateCreateOrUpdateParameters{
	// ...
}


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

Example Usage: CertificateClient.Delete

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

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CertificateClient.Get

ctx := context.TODO()
id := certificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountValue", "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: CertificateClient.ListByBatchAccount

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

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

Example Usage: CertificateClient.Update

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

payload := certificate.CertificateCreateOrUpdateParameters{
	// ...
}


read, err := client.Update(ctx, id, payload, certificate.DefaultUpdateOperationOptions())
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 PossibleValuesForCertificateFormat

func PossibleValuesForCertificateFormat() []string

func PossibleValuesForCertificateProvisioningState

func PossibleValuesForCertificateProvisioningState() []string

func ValidateBatchAccountID

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

ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID

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 BatchAccountId

type BatchAccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	BatchAccountName  string
}

BatchAccountId is a struct representing the Resource ID for a Batch Account

func NewBatchAccountID

func NewBatchAccountID(subscriptionId string, resourceGroupName string, batchAccountName string) BatchAccountId

NewBatchAccountID returns a new BatchAccountId struct

func ParseBatchAccountID

func ParseBatchAccountID(input string) (*BatchAccountId, error)

ParseBatchAccountID parses 'input' into a BatchAccountId

func ParseBatchAccountIDInsensitively

func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error)

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

func (BatchAccountId) ID

func (id BatchAccountId) ID() string

ID returns the formatted Batch Account ID

func (BatchAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Batch Account ID

func (BatchAccountId) String

func (id BatchAccountId) String() string

String returns a human-readable description of this Batch Account ID

type CancelDeletionOperationResponse

type CancelDeletionOperationResponse struct {
	HttpResponse *http.Response
	Model        *Certificate
}

type Certificate

type Certificate struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *CertificateProperties `json:"properties,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type CertificateClient

type CertificateClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewCertificateClientWithBaseURI

func NewCertificateClientWithBaseURI(endpoint string) CertificateClient

func (CertificateClient) CancelDeletion

func (c CertificateClient) CancelDeletion(ctx context.Context, id CertificateId) (result CancelDeletionOperationResponse, err error)

CancelDeletion ...

func (CertificateClient) Create

Create ...

func (CertificateClient) Delete

Delete ...

func (CertificateClient) DeleteThenPoll

func (c CertificateClient) DeleteThenPoll(ctx context.Context, id CertificateId) error

DeleteThenPoll performs Delete then polls until it's completed

func (CertificateClient) Get

Get ...

func (CertificateClient) ListByBatchAccount

ListByBatchAccount ...

func (CertificateClient) ListByBatchAccountComplete

ListByBatchAccountComplete retrieves all of the results into a single object

func (CertificateClient) ListByBatchAccountCompleteMatchingPredicate

func (c CertificateClient) ListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions, predicate CertificateOperationPredicate) (resp ListByBatchAccountCompleteResult, err error)

ListByBatchAccountCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (CertificateClient) Update

Update ...

type CertificateCreateOrUpdateParameters

type CertificateCreateOrUpdateParameters struct {
	Etag       *string                              `json:"etag,omitempty"`
	Id         *string                              `json:"id,omitempty"`
	Name       *string                              `json:"name,omitempty"`
	Properties *CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
	Type       *string                              `json:"type,omitempty"`
}

type CertificateCreateOrUpdateProperties

type CertificateCreateOrUpdateProperties struct {
	Data                string             `json:"data"`
	Format              *CertificateFormat `json:"format,omitempty"`
	Password            *string            `json:"password,omitempty"`
	Thumbprint          *string            `json:"thumbprint,omitempty"`
	ThumbprintAlgorithm *string            `json:"thumbprintAlgorithm,omitempty"`
}

type CertificateFormat

type CertificateFormat string
const (
	CertificateFormatCer CertificateFormat = "Cer"
	CertificateFormatPfx CertificateFormat = "Pfx"
)

type CertificateId

type CertificateId struct {
	SubscriptionId    string
	ResourceGroupName string
	BatchAccountName  string
	CertificateName   string
}

CertificateId is a struct representing the Resource ID for a Certificate

func NewCertificateID

func NewCertificateID(subscriptionId string, resourceGroupName string, batchAccountName 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) 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 {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (CertificateOperationPredicate) Matches

type CertificateProperties

type CertificateProperties struct {
	DeleteCertificateError                  *DeleteCertificateError       `json:"deleteCertificateError,omitempty"`
	Format                                  *CertificateFormat            `json:"format,omitempty"`
	PreviousProvisioningState               *CertificateProvisioningState `json:"previousProvisioningState,omitempty"`
	PreviousProvisioningStateTransitionTime *string                       `json:"previousProvisioningStateTransitionTime,omitempty"`
	ProvisioningState                       *CertificateProvisioningState `json:"provisioningState,omitempty"`
	ProvisioningStateTransitionTime         *string                       `json:"provisioningStateTransitionTime,omitempty"`
	PublicData                              *string                       `json:"publicData,omitempty"`
	Thumbprint                              *string                       `json:"thumbprint,omitempty"`
	ThumbprintAlgorithm                     *string                       `json:"thumbprintAlgorithm,omitempty"`
}

func (*CertificateProperties) GetPreviousProvisioningStateTransitionTimeAsTime

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

func (*CertificateProperties) GetProvisioningStateTransitionTimeAsTime

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

func (*CertificateProperties) SetPreviousProvisioningStateTransitionTimeAsTime

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

func (*CertificateProperties) SetProvisioningStateTransitionTimeAsTime

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

type CertificateProvisioningState

type CertificateProvisioningState string
const (
	CertificateProvisioningStateDeleting  CertificateProvisioningState = "Deleting"
	CertificateProvisioningStateFailed    CertificateProvisioningState = "Failed"
	CertificateProvisioningStateSucceeded CertificateProvisioningState = "Succeeded"
)

type CreateOperationOptions

type CreateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOperationOptions

func DefaultCreateOperationOptions() CreateOperationOptions

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Certificate
}

type DeleteCertificateError

type DeleteCertificateError struct {
	Code    string                    `json:"code"`
	Details *[]DeleteCertificateError `json:"details,omitempty"`
	Message string                    `json:"message"`
	Target  *string                   `json:"target,omitempty"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ListByBatchAccountCompleteResult

type ListByBatchAccountCompleteResult struct {
	Items []Certificate
}

type ListByBatchAccountOperationOptions

type ListByBatchAccountOperationOptions struct {
	Filter     *string
	Maxresults *int64
	Select     *string
}

func DefaultListByBatchAccountOperationOptions

func DefaultListByBatchAccountOperationOptions() ListByBatchAccountOperationOptions

type ListByBatchAccountOperationResponse

type ListByBatchAccountOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Certificate
	// contains filtered or unexported fields
}

func (ListByBatchAccountOperationResponse) HasMore

func (ListByBatchAccountOperationResponse) LoadMore

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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