certificate

package
v0.20241126.1723 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/certificate Documentation

The certificate SDK allows for interaction with Azure Resource Manager apimanagement (API Version 2024-05-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/2024-05-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", "serviceName", "certificateId")

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", "serviceName", "certificateId")

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", "serviceName", "certificateId")

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", "serviceName", "certificateId")

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", "serviceName")

// 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", "serviceName", "certificateId")

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
}

Example Usage: CertificateClient.WorkspaceCertificateCreateOrUpdate

ctx := context.TODO()
id := certificate.NewWorkspaceCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "certificateId")

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


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

Example Usage: CertificateClient.WorkspaceCertificateDelete

ctx := context.TODO()
id := certificate.NewWorkspaceCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "certificateId")

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

Example Usage: CertificateClient.WorkspaceCertificateGet

ctx := context.TODO()
id := certificate.NewWorkspaceCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "certificateId")

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

Example Usage: CertificateClient.WorkspaceCertificateGetEntityTag

ctx := context.TODO()
id := certificate.NewWorkspaceCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "certificateId")

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

Example Usage: CertificateClient.WorkspaceCertificateListByWorkspace

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

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

Example Usage: CertificateClient.WorkspaceCertificateRefreshSecret

ctx := context.TODO()
id := certificate.NewWorkspaceCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "certificateId")

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

func ValidateWorkspaceCertificateID

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

ValidateWorkspaceCertificateID checks that 'input' can be parsed as a Workspace Certificate ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace 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 ...

func (CertificateClient) WorkspaceCertificateCreateOrUpdate

WorkspaceCertificateCreateOrUpdate ...

func (CertificateClient) WorkspaceCertificateDelete

WorkspaceCertificateDelete ...

func (CertificateClient) WorkspaceCertificateGet

WorkspaceCertificateGet ...

func (CertificateClient) WorkspaceCertificateGetEntityTag

func (c CertificateClient) WorkspaceCertificateGetEntityTag(ctx context.Context, id WorkspaceCertificateId) (result WorkspaceCertificateGetEntityTagOperationResponse, err error)

WorkspaceCertificateGetEntityTag ...

func (CertificateClient) WorkspaceCertificateListByWorkspace

WorkspaceCertificateListByWorkspace ...

func (CertificateClient) WorkspaceCertificateListByWorkspaceComplete

WorkspaceCertificateListByWorkspaceComplete retrieves all the results into a single object

func (CertificateClient) WorkspaceCertificateListByWorkspaceCompleteMatchingPredicate

WorkspaceCertificateListByWorkspaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CertificateClient) WorkspaceCertificateRefreshSecret

func (c CertificateClient) WorkspaceCertificateRefreshSecret(ctx context.Context, id WorkspaceCertificateId) (result WorkspaceCertificateRefreshSecretOperationResponse, err error)

WorkspaceCertificateRefreshSecret ...

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 ListByServiceCustomPager

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

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

type WorkspaceCertificateCreateOrUpdateOperationOptions

type WorkspaceCertificateCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceCertificateCreateOrUpdateOperationOptions

func DefaultWorkspaceCertificateCreateOrUpdateOperationOptions() WorkspaceCertificateCreateOrUpdateOperationOptions

func (WorkspaceCertificateCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceCertificateCreateOrUpdateOperationOptions) ToOData

func (WorkspaceCertificateCreateOrUpdateOperationOptions) ToQuery

type WorkspaceCertificateCreateOrUpdateOperationResponse

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

type WorkspaceCertificateDeleteOperationOptions

type WorkspaceCertificateDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceCertificateDeleteOperationOptions

func DefaultWorkspaceCertificateDeleteOperationOptions() WorkspaceCertificateDeleteOperationOptions

func (WorkspaceCertificateDeleteOperationOptions) ToHeaders

func (WorkspaceCertificateDeleteOperationOptions) ToOData

func (WorkspaceCertificateDeleteOperationOptions) ToQuery

type WorkspaceCertificateDeleteOperationResponse

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

type WorkspaceCertificateGetEntityTagOperationResponse

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

type WorkspaceCertificateGetOperationResponse

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

type WorkspaceCertificateId

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

WorkspaceCertificateId is a struct representing the Resource ID for a Workspace Certificate

func NewWorkspaceCertificateID

func NewWorkspaceCertificateID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, certificateId string) WorkspaceCertificateId

NewWorkspaceCertificateID returns a new WorkspaceCertificateId struct

func ParseWorkspaceCertificateID

func ParseWorkspaceCertificateID(input string) (*WorkspaceCertificateId, error)

ParseWorkspaceCertificateID parses 'input' into a WorkspaceCertificateId

func ParseWorkspaceCertificateIDInsensitively

func ParseWorkspaceCertificateIDInsensitively(input string) (*WorkspaceCertificateId, error)

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

func (*WorkspaceCertificateId) FromParseResult

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

func (WorkspaceCertificateId) ID

ID returns the formatted Workspace Certificate ID

func (WorkspaceCertificateId) Segments

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

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

func (WorkspaceCertificateId) String

func (id WorkspaceCertificateId) String() string

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

type WorkspaceCertificateListByWorkspaceCompleteResult

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

type WorkspaceCertificateListByWorkspaceCustomPager

type WorkspaceCertificateListByWorkspaceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type WorkspaceCertificateListByWorkspaceOperationOptions

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

func DefaultWorkspaceCertificateListByWorkspaceOperationOptions

func DefaultWorkspaceCertificateListByWorkspaceOperationOptions() WorkspaceCertificateListByWorkspaceOperationOptions

func (WorkspaceCertificateListByWorkspaceOperationOptions) ToHeaders

func (WorkspaceCertificateListByWorkspaceOperationOptions) ToOData

func (WorkspaceCertificateListByWorkspaceOperationOptions) ToQuery

type WorkspaceCertificateListByWorkspaceOperationResponse

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

type WorkspaceCertificateRefreshSecretOperationResponse

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

type WorkspaceId

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

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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