certificateprofiles

package
v0.20241212.1154051 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/codesigning/2024-09-30-preview/certificateprofiles Documentation

The certificateprofiles SDK allows for interaction with Azure Resource Manager codesigning (API Version 2024-09-30-preview).

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/codesigning/2024-09-30-preview/certificateprofiles"

Client Initialization

client := certificateprofiles.NewCertificateProfilesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CertificateProfilesClient.Create

ctx := context.TODO()
id := certificateprofiles.NewCertificateProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "codeSigningAccountName", "certificateProfileName")

payload := certificateprofiles.CertificateProfile{
	// ...
}


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

Example Usage: CertificateProfilesClient.Delete

ctx := context.TODO()
id := certificateprofiles.NewCertificateProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "codeSigningAccountName", "certificateProfileName")

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

Example Usage: CertificateProfilesClient.Get

ctx := context.TODO()
id := certificateprofiles.NewCertificateProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "codeSigningAccountName", "certificateProfileName")

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: CertificateProfilesClient.ListByCodeSigningAccount

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

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

Example Usage: CertificateProfilesClient.RevokeCertificate

ctx := context.TODO()
id := certificateprofiles.NewCertificateProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "codeSigningAccountName", "certificateProfileName")

payload := certificateprofiles.RevokeCertificate{
	// ...
}


read, err := client.RevokeCertificate(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 PossibleValuesForCertificateProfileStatus

func PossibleValuesForCertificateProfileStatus() []string

func PossibleValuesForCertificateStatus

func PossibleValuesForCertificateStatus() []string

func PossibleValuesForProfileType

func PossibleValuesForProfileType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForRevocationStatus

func PossibleValuesForRevocationStatus() []string

func ValidateCertificateProfileID

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

ValidateCertificateProfileID checks that 'input' can be parsed as a Certificate Profile ID

func ValidateCodeSigningAccountID

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

ValidateCodeSigningAccountID checks that 'input' can be parsed as a Code Signing Account ID

Types

type Certificate

type Certificate struct {
	CreatedDate      *string            `json:"createdDate,omitempty"`
	EnhancedKeyUsage *string            `json:"enhancedKeyUsage,omitempty"`
	ExpiryDate       *string            `json:"expiryDate,omitempty"`
	Revocation       *Revocation        `json:"revocation,omitempty"`
	SerialNumber     *string            `json:"serialNumber,omitempty"`
	Status           *CertificateStatus `json:"status,omitempty"`
	SubjectName      *string            `json:"subjectName,omitempty"`
	Thumbprint       *string            `json:"thumbprint,omitempty"`
}

type CertificateProfile

type CertificateProfile struct {
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *CertificateProfileProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData        `json:"systemData,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type CertificateProfileId

type CertificateProfileId struct {
	SubscriptionId         string
	ResourceGroupName      string
	CodeSigningAccountName string
	CertificateProfileName string
}

CertificateProfileId is a struct representing the Resource ID for a Certificate Profile

func NewCertificateProfileID

func NewCertificateProfileID(subscriptionId string, resourceGroupName string, codeSigningAccountName string, certificateProfileName string) CertificateProfileId

NewCertificateProfileID returns a new CertificateProfileId struct

func ParseCertificateProfileID

func ParseCertificateProfileID(input string) (*CertificateProfileId, error)

ParseCertificateProfileID parses 'input' into a CertificateProfileId

func ParseCertificateProfileIDInsensitively

func ParseCertificateProfileIDInsensitively(input string) (*CertificateProfileId, error)

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

func (*CertificateProfileId) FromParseResult

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

func (CertificateProfileId) ID

func (id CertificateProfileId) ID() string

ID returns the formatted Certificate Profile ID

func (CertificateProfileId) Segments

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

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

func (CertificateProfileId) String

func (id CertificateProfileId) String() string

String returns a human-readable description of this Certificate Profile ID

type CertificateProfileOperationPredicate

type CertificateProfileOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (CertificateProfileOperationPredicate) Matches

type CertificateProfileProperties

type CertificateProfileProperties struct {
	Certificates         *[]Certificate            `json:"certificates,omitempty"`
	IdentityValidationId string                    `json:"identityValidationId"`
	IncludeCity          *bool                     `json:"includeCity,omitempty"`
	IncludeCountry       *bool                     `json:"includeCountry,omitempty"`
	IncludePostalCode    *bool                     `json:"includePostalCode,omitempty"`
	IncludeState         *bool                     `json:"includeState,omitempty"`
	IncludeStreetAddress *bool                     `json:"includeStreetAddress,omitempty"`
	ProfileType          ProfileType               `json:"profileType"`
	ProvisioningState    *ProvisioningState        `json:"provisioningState,omitempty"`
	Status               *CertificateProfileStatus `json:"status,omitempty"`
}

type CertificateProfileStatus

type CertificateProfileStatus string
const (
	CertificateProfileStatusActive    CertificateProfileStatus = "Active"
	CertificateProfileStatusDisabled  CertificateProfileStatus = "Disabled"
	CertificateProfileStatusSuspended CertificateProfileStatus = "Suspended"
)

func (*CertificateProfileStatus) UnmarshalJSON

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

type CertificateProfilesClient

type CertificateProfilesClient struct {
	Client *resourcemanager.Client
}

func NewCertificateProfilesClientWithBaseURI

func NewCertificateProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateProfilesClient, error)

func (CertificateProfilesClient) Create

Create ...

func (CertificateProfilesClient) CreateThenPoll

CreateThenPoll performs Create then polls until it's completed

func (CertificateProfilesClient) Delete

Delete ...

func (CertificateProfilesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (CertificateProfilesClient) Get

Get ...

func (CertificateProfilesClient) ListByCodeSigningAccount

ListByCodeSigningAccount ...

func (CertificateProfilesClient) ListByCodeSigningAccountComplete

ListByCodeSigningAccountComplete retrieves all the results into a single object

func (CertificateProfilesClient) ListByCodeSigningAccountCompleteMatchingPredicate

func (c CertificateProfilesClient) ListByCodeSigningAccountCompleteMatchingPredicate(ctx context.Context, id CodeSigningAccountId, predicate CertificateProfileOperationPredicate) (result ListByCodeSigningAccountCompleteResult, err error)

ListByCodeSigningAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CertificateProfilesClient) RevokeCertificate

RevokeCertificate ...

type CertificateStatus

type CertificateStatus string
const (
	CertificateStatusActive  CertificateStatus = "Active"
	CertificateStatusExpired CertificateStatus = "Expired"
	CertificateStatusRevoked CertificateStatus = "Revoked"
)

func (*CertificateStatus) UnmarshalJSON

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

type CodeSigningAccountId

type CodeSigningAccountId struct {
	SubscriptionId         string
	ResourceGroupName      string
	CodeSigningAccountName string
}

CodeSigningAccountId is a struct representing the Resource ID for a Code Signing Account

func NewCodeSigningAccountID

func NewCodeSigningAccountID(subscriptionId string, resourceGroupName string, codeSigningAccountName string) CodeSigningAccountId

NewCodeSigningAccountID returns a new CodeSigningAccountId struct

func ParseCodeSigningAccountID

func ParseCodeSigningAccountID(input string) (*CodeSigningAccountId, error)

ParseCodeSigningAccountID parses 'input' into a CodeSigningAccountId

func ParseCodeSigningAccountIDInsensitively

func ParseCodeSigningAccountIDInsensitively(input string) (*CodeSigningAccountId, error)

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

func (*CodeSigningAccountId) FromParseResult

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

func (CodeSigningAccountId) ID

func (id CodeSigningAccountId) ID() string

ID returns the formatted Code Signing Account ID

func (CodeSigningAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Code Signing Account ID

func (CodeSigningAccountId) String

func (id CodeSigningAccountId) String() string

String returns a human-readable description of this Code Signing Account ID

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CertificateProfile
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByCodeSigningAccountCompleteResult

type ListByCodeSigningAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CertificateProfile
}

type ListByCodeSigningAccountCustomPager

type ListByCodeSigningAccountCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByCodeSigningAccountCustomPager) NextPageLink() *odata.Link

type ListByCodeSigningAccountOperationResponse

type ListByCodeSigningAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CertificateProfile
}

type ProfileType

type ProfileType string
const (
	ProfileTypePrivateTrust         ProfileType = "PrivateTrust"
	ProfileTypePrivateTrustCIPolicy ProfileType = "PrivateTrustCIPolicy"
	ProfileTypePublicTrust          ProfileType = "PublicTrust"
	ProfileTypePublicTrustTest      ProfileType = "PublicTrustTest"
	ProfileTypeVBSEnclave           ProfileType = "VBSEnclave"
)

func (*ProfileType) UnmarshalJSON

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type Revocation

type Revocation struct {
	EffectiveAt   *string           `json:"effectiveAt,omitempty"`
	FailureReason *string           `json:"failureReason,omitempty"`
	Reason        *string           `json:"reason,omitempty"`
	Remarks       *string           `json:"remarks,omitempty"`
	RequestedAt   *string           `json:"requestedAt,omitempty"`
	Status        *RevocationStatus `json:"status,omitempty"`
}

func (*Revocation) GetEffectiveAtAsTime

func (o *Revocation) GetEffectiveAtAsTime() (*time.Time, error)

func (*Revocation) GetRequestedAtAsTime

func (o *Revocation) GetRequestedAtAsTime() (*time.Time, error)

func (*Revocation) SetEffectiveAtAsTime

func (o *Revocation) SetEffectiveAtAsTime(input time.Time)

func (*Revocation) SetRequestedAtAsTime

func (o *Revocation) SetRequestedAtAsTime(input time.Time)

type RevocationStatus

type RevocationStatus string
const (
	RevocationStatusFailed     RevocationStatus = "Failed"
	RevocationStatusInProgress RevocationStatus = "InProgress"
	RevocationStatusSucceeded  RevocationStatus = "Succeeded"
)

func (*RevocationStatus) UnmarshalJSON

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

type RevokeCertificate

type RevokeCertificate struct {
	EffectiveAt  string  `json:"effectiveAt"`
	Reason       string  `json:"reason"`
	Remarks      *string `json:"remarks,omitempty"`
	SerialNumber string  `json:"serialNumber"`
	Thumbprint   string  `json:"thumbprint"`
}

func (*RevokeCertificate) GetEffectiveAtAsTime

func (o *RevokeCertificate) GetEffectiveAtAsTime() (*time.Time, error)

func (*RevokeCertificate) SetEffectiveAtAsTime

func (o *RevokeCertificate) SetEffectiveAtAsTime(input time.Time)

type RevokeCertificateOperationResponse

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

Jump to

Keyboard shortcuts

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