dpscertificate

package
v0.20240312.1123713 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate Documentation

The dpscertificate SDK allows for interaction with the Azure Resource Manager Service deviceprovisioningservices (API Version 2022-12-12).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-12-12/dpscertificate"

Client Initialization

client := dpscertificate.NewDpsCertificateClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DpsCertificateClient.CreateOrUpdate

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

payload := dpscertificate.CertificateResponse{
	// ...
}


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

Example Usage: DpsCertificateClient.Delete

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

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

Example Usage: DpsCertificateClient.GenerateVerificationCode

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

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

Example Usage: DpsCertificateClient.Get

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

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

Example Usage: DpsCertificateClient.List

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

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

Example Usage: DpsCertificateClient.VerifyCertificate

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

payload := dpscertificate.VerificationCodeRequest{
	// ...
}


read, err := client.VerifyCertificate(ctx, id, payload, dpscertificate.DefaultVerifyCertificateOperationOptions())
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 PossibleValuesForCertificatePurpose

func PossibleValuesForCertificatePurpose() []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 CertificateId

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

CertificateId is a struct representing the Resource ID for a Certificate

func NewCertificateID

func NewCertificateID(subscriptionId string, resourceGroupName string, provisioningServiceName 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

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 CertificateListDescription

type CertificateListDescription struct {
	Value *[]CertificateResponse `json:"value,omitempty"`
}

type CertificateProperties

type CertificateProperties struct {
	Certificate *string `json:"certificate,omitempty"`
	Created     *string `json:"created,omitempty"`
	Expiry      *string `json:"expiry,omitempty"`
	IsVerified  *bool   `json:"isVerified,omitempty"`
	Subject     *string `json:"subject,omitempty"`
	Thumbprint  *string `json:"thumbprint,omitempty"`
	Updated     *string `json:"updated,omitempty"`
}

type CertificatePurpose

type CertificatePurpose string
const (
	CertificatePurposeClientAuthentication CertificatePurpose = "clientAuthentication"
	CertificatePurposeServerAuthentication CertificatePurpose = "serverAuthentication"
)

func (*CertificatePurpose) UnmarshalJSON

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

type CertificateResponse

type CertificateResponse struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *CertificateProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	CertificateCreated       *string
	CertificateHasPrivateKey *bool
	CertificateIsVerified    *bool
	CertificateLastUpdated   *string
	CertificateName          *string
	CertificateNonce         *string
	CertificatePurpose       *CertificatePurpose
	CertificateRawBytes      *string
	IfMatch                  *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type DpsCertificateClient

type DpsCertificateClient struct {
	Client *resourcemanager.Client
}

func NewDpsCertificateClientWithBaseURI

func NewDpsCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*DpsCertificateClient, error)

func (DpsCertificateClient) CreateOrUpdate

CreateOrUpdate ...

func (DpsCertificateClient) Delete

Delete ...

func (DpsCertificateClient) GenerateVerificationCode

GenerateVerificationCode ...

func (DpsCertificateClient) Get

Get ...

func (DpsCertificateClient) List

List ...

func (DpsCertificateClient) VerifyCertificate

VerifyCertificate ...

type GenerateVerificationCodeOperationOptions

type GenerateVerificationCodeOperationOptions struct {
	CertificateCreated       *string
	CertificateHasPrivateKey *bool
	CertificateIsVerified    *bool
	CertificateLastUpdated   *string
	CertificateName          *string
	CertificateNonce         *string
	CertificatePurpose       *CertificatePurpose
	CertificateRawBytes      *string
	IfMatch                  *string
}

func DefaultGenerateVerificationCodeOperationOptions

func DefaultGenerateVerificationCodeOperationOptions() GenerateVerificationCodeOperationOptions

func (GenerateVerificationCodeOperationOptions) ToHeaders

func (GenerateVerificationCodeOperationOptions) ToOData

func (GenerateVerificationCodeOperationOptions) ToQuery

type GenerateVerificationCodeOperationResponse

type GenerateVerificationCodeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VerificationCodeResponse
}

type GetOperationOptions

type GetOperationOptions struct {
	IfMatch *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

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

func (GetOperationOptions) ToOData

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

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CertificateListDescription
}

type VerificationCodeRequest

type VerificationCodeRequest struct {
	Certificate *string `json:"certificate,omitempty"`
}

type VerificationCodeResponse

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

type VerificationCodeResponseProperties

type VerificationCodeResponseProperties struct {
	Certificate      *string `json:"certificate,omitempty"`
	Created          *string `json:"created,omitempty"`
	Expiry           *string `json:"expiry,omitempty"`
	IsVerified       *bool   `json:"isVerified,omitempty"`
	Subject          *string `json:"subject,omitempty"`
	Thumbprint       *string `json:"thumbprint,omitempty"`
	Updated          *string `json:"updated,omitempty"`
	VerificationCode *string `json:"verificationCode,omitempty"`
}

type VerifyCertificateOperationOptions

type VerifyCertificateOperationOptions struct {
	CertificateCreated       *string
	CertificateHasPrivateKey *bool
	CertificateIsVerified    *bool
	CertificateLastUpdated   *string
	CertificateName          *string
	CertificateNonce         *string
	CertificatePurpose       *CertificatePurpose
	CertificateRawBytes      *string
	IfMatch                  *string
}

func DefaultVerifyCertificateOperationOptions

func DefaultVerifyCertificateOperationOptions() VerifyCertificateOperationOptions

func (VerifyCertificateOperationOptions) ToHeaders

func (VerifyCertificateOperationOptions) ToOData

func (VerifyCertificateOperationOptions) ToQuery

type VerifyCertificateOperationResponse

type VerifyCertificateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CertificateResponse
}

Jump to

Keyboard shortcuts

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