README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/deviceprovisioningservices/2022-02-05/dpscertificate
Documentation
The dpscertificate
SDK allows for interaction with the Azure Resource Manager Service deviceprovisioningservices
(API Version 2022-02-05
).
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/deviceprovisioningservices/2022-02-05/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 := dpscertificate.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 ¶
- func PossibleValuesForCertificatePurpose() []string
- func ValidateCertificateID(input interface{}, key string) (warnings []string, errors []error)
- type CertificateId
- type CertificateListDescription
- type CertificateProperties
- type CertificatePurpose
- type CertificateResponse
- type CreateOrUpdateOperationOptions
- type CreateOrUpdateOperationResponse
- type DeleteOperationOptions
- type DeleteOperationResponse
- type DpsCertificateClient
- func (c DpsCertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, input CertificateResponse, ...) (result CreateOrUpdateOperationResponse, err error)
- func (c DpsCertificateClient) Delete(ctx context.Context, id CertificateId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
- func (c DpsCertificateClient) GenerateVerificationCode(ctx context.Context, id CertificateId, ...) (result GenerateVerificationCodeOperationResponse, err error)
- func (c DpsCertificateClient) Get(ctx context.Context, id CertificateId, options GetOperationOptions) (result GetOperationResponse, err error)
- func (c DpsCertificateClient) List(ctx context.Context, id commonids.ProvisioningServiceId) (result ListOperationResponse, err error)
- func (c DpsCertificateClient) VerifyCertificate(ctx context.Context, id CertificateId, input VerificationCodeRequest, ...) (result VerifyCertificateOperationResponse, err error)
- type GenerateVerificationCodeOperationOptions
- type GenerateVerificationCodeOperationResponse
- type GetOperationOptions
- type GetOperationResponse
- type ListOperationResponse
- type VerificationCodeRequest
- type VerificationCodeResponse
- type VerificationCodeResponseProperties
- type VerifyCertificateOperationOptions
- type VerifyCertificateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForCertificatePurpose ¶
func PossibleValuesForCertificatePurpose() []string
func ValidateCertificateID ¶
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) 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 ¶ added in v0.20230725.1205316
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 ¶ added in v0.20230725.1205316
func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers
func (CreateOrUpdateOperationOptions) ToOData ¶ added in v0.20230725.1205316
func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query
func (CreateOrUpdateOperationOptions) ToQuery ¶ added in v0.20230725.1205316
func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams
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 ¶ added in v0.20230725.1205316
func (o DeleteOperationOptions) ToHeaders() *client.Headers
func (DeleteOperationOptions) ToOData ¶ added in v0.20230725.1205316
func (o DeleteOperationOptions) ToOData() *odata.Query
func (DeleteOperationOptions) ToQuery ¶ added in v0.20230725.1205316
func (o DeleteOperationOptions) ToQuery() *client.QueryParams
type DeleteOperationResponse ¶
type DpsCertificateClient ¶
type DpsCertificateClient struct {
Client *resourcemanager.Client
}
func NewDpsCertificateClientWithBaseURI ¶
func NewDpsCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*DpsCertificateClient, error)
func (DpsCertificateClient) CreateOrUpdate ¶
func (c DpsCertificateClient) CreateOrUpdate(ctx context.Context, id CertificateId, input CertificateResponse, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (DpsCertificateClient) Delete ¶
func (c DpsCertificateClient) Delete(ctx context.Context, id CertificateId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
Delete ...
func (DpsCertificateClient) GenerateVerificationCode ¶
func (c DpsCertificateClient) GenerateVerificationCode(ctx context.Context, id CertificateId, options GenerateVerificationCodeOperationOptions) (result GenerateVerificationCodeOperationResponse, err error)
GenerateVerificationCode ...
func (DpsCertificateClient) Get ¶
func (c DpsCertificateClient) Get(ctx context.Context, id CertificateId, options GetOperationOptions) (result GetOperationResponse, err error)
Get ...
func (DpsCertificateClient) List ¶
func (c DpsCertificateClient) List(ctx context.Context, id commonids.ProvisioningServiceId) (result ListOperationResponse, err error)
List ...
func (DpsCertificateClient) VerifyCertificate ¶
func (c DpsCertificateClient) VerifyCertificate(ctx context.Context, id CertificateId, input VerificationCodeRequest, options VerifyCertificateOperationOptions) (result VerifyCertificateOperationResponse, err error)
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 ¶ added in v0.20230725.1205316
func (o GenerateVerificationCodeOperationOptions) ToHeaders() *client.Headers
func (GenerateVerificationCodeOperationOptions) ToOData ¶ added in v0.20230725.1205316
func (o GenerateVerificationCodeOperationOptions) ToOData() *odata.Query
func (GenerateVerificationCodeOperationOptions) ToQuery ¶ added in v0.20230725.1205316
func (o GenerateVerificationCodeOperationOptions) ToQuery() *client.QueryParams
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 ¶ added in v0.20230725.1205316
func (o GetOperationOptions) ToHeaders() *client.Headers
func (GetOperationOptions) ToOData ¶ added in v0.20230725.1205316
func (o GetOperationOptions) ToOData() *odata.Query
func (GetOperationOptions) ToQuery ¶ added in v0.20230725.1205316
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 ¶ added in v0.20230725.1205316
func (o VerifyCertificateOperationOptions) ToHeaders() *client.Headers
func (VerifyCertificateOperationOptions) ToOData ¶ added in v0.20230725.1205316
func (o VerifyCertificateOperationOptions) ToOData() *odata.Query
func (VerifyCertificateOperationOptions) ToQuery ¶ added in v0.20230725.1205316
func (o VerifyCertificateOperationOptions) ToQuery() *client.QueryParams
type VerifyCertificateOperationResponse ¶
type VerifyCertificateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *CertificateResponse }
Source Files ¶
- client.go
- constants.go
- id_certificate.go
- method_createorupdate.go
- method_delete.go
- method_generateverificationcode.go
- method_get.go
- method_list.go
- method_verifycertificate.go
- model_certificatelistdescription.go
- model_certificateproperties.go
- model_certificateresponse.go
- model_verificationcoderequest.go
- model_verificationcoderesponse.go
- model_verificationcoderesponseproperties.go
- version.go