certificate

package
v0.20240527.1094340 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/certificate Documentation

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

Client Initialization

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

Example Usage: CertificateClient.CreateOrUpdate

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

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


read, err := client.CreateOrUpdate(ctx, id, payload, certificate.DefaultCreateOrUpdateOperationOptions())
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", "serviceValue", "certificateIdValue")

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

Example Usage: CertificateClient.Get

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

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.GetEntityTag

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

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

Example Usage: CertificateClient.ListByService

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

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

Example Usage: CertificateClient.RefreshSecret

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

read, err := client.RefreshSecret(ctx, id)
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 ValidateCertificateID

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

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

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type CertificateClient

type CertificateClient struct {
	Client *resourcemanager.Client
}

func NewCertificateClientWithBaseURI

func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error)

func (CertificateClient) CreateOrUpdate

CreateOrUpdate ...

func (CertificateClient) Delete

Delete ...

func (CertificateClient) Get

Get ...

func (CertificateClient) GetEntityTag

func (c CertificateClient) GetEntityTag(ctx context.Context, id CertificateId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (CertificateClient) ListByService

ListByService ...

func (CertificateClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (CertificateClient) ListByServiceCompleteMatchingPredicate

func (c CertificateClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate CertificateContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CertificateClient) RefreshSecret

func (c CertificateClient) RefreshSecret(ctx context.Context, id CertificateId) (result RefreshSecretOperationResponse, err error)

RefreshSecret ...

type CertificateContract

type CertificateContract struct {
	Id         *string                        `json:"id,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *CertificateContractProperties `json:"properties,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type CertificateContractOperationPredicate

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

func (CertificateContractOperationPredicate) Matches

type CertificateContractProperties

type CertificateContractProperties struct {
	ExpirationDate string                      `json:"expirationDate"`
	KeyVault       *KeyVaultContractProperties `json:"keyVault,omitempty"`
	Subject        string                      `json:"subject"`
	Thumbprint     string                      `json:"thumbprint"`
}

func (*CertificateContractProperties) GetExpirationDateAsTime

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

func (*CertificateContractProperties) SetExpirationDateAsTime

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

type CertificateCreateOrUpdateParameters

type CertificateCreateOrUpdateParameters struct {
	Properties *CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
}

type CertificateCreateOrUpdateProperties

type CertificateCreateOrUpdateProperties struct {
	Data     *string                           `json:"data,omitempty"`
	KeyVault *KeyVaultContractCreateProperties `json:"keyVault,omitempty"`
	Password *string                           `json:"password,omitempty"`
}

type CertificateId

type CertificateId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	CertificateId     string
}

CertificateId is a struct representing the Resource ID for a Certificate

func NewCertificateID

func NewCertificateID(subscriptionId string, resourceGroupName string, serviceName string, certificateId 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 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        *CertificateContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	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 GetEntityTagOperationResponse

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

type GetOperationResponse

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

type KeyVaultContractCreateProperties

type KeyVaultContractCreateProperties struct {
	IdentityClientId *string `json:"identityClientId,omitempty"`
	SecretIdentifier *string `json:"secretIdentifier,omitempty"`
}

type KeyVaultContractProperties

type KeyVaultContractProperties struct {
	IdentityClientId *string                                     `json:"identityClientId,omitempty"`
	LastStatus       *KeyVaultLastAccessStatusContractProperties `json:"lastStatus,omitempty"`
	SecretIdentifier *string                                     `json:"secretIdentifier,omitempty"`
}

type KeyVaultLastAccessStatusContractProperties

type KeyVaultLastAccessStatusContractProperties struct {
	Code         *string `json:"code,omitempty"`
	Message      *string `json:"message,omitempty"`
	TimeStampUtc *string `json:"timeStampUtc,omitempty"`
}

func (*KeyVaultLastAccessStatusContractProperties) GetTimeStampUtcAsTime

func (o *KeyVaultLastAccessStatusContractProperties) GetTimeStampUtcAsTime() (*time.Time, error)

func (*KeyVaultLastAccessStatusContractProperties) SetTimeStampUtcAsTime

func (o *KeyVaultLastAccessStatusContractProperties) SetTimeStampUtcAsTime(input time.Time)

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CertificateContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter                  *string
	IsKeyVaultRefreshFailed *bool
	Skip                    *int64
	Top                     *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders

func (ListByServiceOperationOptions) ToOData

func (ListByServiceOperationOptions) ToQuery

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CertificateContract
}

type RefreshSecretOperationResponse

type RefreshSecretOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CertificateContract
}

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (*ServiceId) FromParseResult

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

Jump to

Keyboard shortcuts

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