attestations

package
v0.20230825.1130400 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2022-09-01/attestations Documentation

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

Client Initialization

client := attestations.NewAttestationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AttestationsClient.AttestationsCreateOrUpdateAtResource

ctx := context.TODO()
id := attestations.NewScopedAttestationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "attestationValue")

payload := attestations.Attestation{
	// ...
}


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

Example Usage: AttestationsClient.AttestationsCreateOrUpdateAtResourceGroup

ctx := context.TODO()
id := attestations.NewProviderAttestationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "attestationValue")

payload := attestations.Attestation{
	// ...
}


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

Example Usage: AttestationsClient.AttestationsCreateOrUpdateAtSubscription

ctx := context.TODO()
id := attestations.NewAttestationID("12345678-1234-9876-4563-123456789012", "attestationValue")

payload := attestations.Attestation{
	// ...
}


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

Example Usage: AttestationsClient.AttestationsDeleteAtResource

ctx := context.TODO()
id := attestations.NewScopedAttestationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "attestationValue")

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

Example Usage: AttestationsClient.AttestationsDeleteAtResourceGroup

ctx := context.TODO()
id := attestations.NewProviderAttestationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "attestationValue")

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

Example Usage: AttestationsClient.AttestationsDeleteAtSubscription

ctx := context.TODO()
id := attestations.NewAttestationID("12345678-1234-9876-4563-123456789012", "attestationValue")

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

Example Usage: AttestationsClient.AttestationsGetAtResource

ctx := context.TODO()
id := attestations.NewScopedAttestationID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "attestationValue")

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

Example Usage: AttestationsClient.AttestationsGetAtResourceGroup

ctx := context.TODO()
id := attestations.NewProviderAttestationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "attestationValue")

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

Example Usage: AttestationsClient.AttestationsGetAtSubscription

ctx := context.TODO()
id := attestations.NewAttestationID("12345678-1234-9876-4563-123456789012", "attestationValue")

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

Example Usage: AttestationsClient.AttestationsListForResource

ctx := context.TODO()
id := attestations.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: AttestationsClient.AttestationsListForResourceGroup

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

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

Example Usage: AttestationsClient.AttestationsListForSubscription

ctx := context.TODO()
id := attestations.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForComplianceState

func PossibleValuesForComplianceState() []string

func ValidateAttestationID

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

ValidateAttestationID checks that 'input' can be parsed as a Attestation ID

func ValidateProviderAttestationID

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

ValidateProviderAttestationID checks that 'input' can be parsed as a Provider Attestation ID

func ValidateScopedAttestationID

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

ValidateScopedAttestationID checks that 'input' can be parsed as a Scoped Attestation ID

Types

type Attestation

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

type AttestationEvidence

type AttestationEvidence struct {
	Description *string `json:"description,omitempty"`
	SourceUri   *string `json:"sourceUri,omitempty"`
}

type AttestationId

type AttestationId struct {
	SubscriptionId  string
	AttestationName string
}

AttestationId is a struct representing the Resource ID for a Attestation

func NewAttestationID

func NewAttestationID(subscriptionId string, attestationName string) AttestationId

NewAttestationID returns a new AttestationId struct

func ParseAttestationID

func ParseAttestationID(input string) (*AttestationId, error)

ParseAttestationID parses 'input' into a AttestationId

func ParseAttestationIDInsensitively

func ParseAttestationIDInsensitively(input string) (*AttestationId, error)

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

func (AttestationId) ID

func (id AttestationId) ID() string

ID returns the formatted Attestation ID

func (AttestationId) Segments

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

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

func (AttestationId) String

func (id AttestationId) String() string

String returns a human-readable description of this Attestation ID

type AttestationOperationPredicate

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

func (AttestationOperationPredicate) Matches

type AttestationProperties

type AttestationProperties struct {
	AssessmentDate              *string                `json:"assessmentDate,omitempty"`
	Comments                    *string                `json:"comments,omitempty"`
	ComplianceState             *ComplianceState       `json:"complianceState,omitempty"`
	Evidence                    *[]AttestationEvidence `json:"evidence,omitempty"`
	ExpiresOn                   *string                `json:"expiresOn,omitempty"`
	LastComplianceStateChangeAt *string                `json:"lastComplianceStateChangeAt,omitempty"`
	Metadata                    *interface{}           `json:"metadata,omitempty"`
	Owner                       *string                `json:"owner,omitempty"`
	PolicyAssignmentId          string                 `json:"policyAssignmentId"`
	PolicyDefinitionReferenceId *string                `json:"policyDefinitionReferenceId,omitempty"`
	ProvisioningState           *string                `json:"provisioningState,omitempty"`
}

func (*AttestationProperties) GetAssessmentDateAsTime

func (o *AttestationProperties) GetAssessmentDateAsTime() (*time.Time, error)

func (*AttestationProperties) GetExpiresOnAsTime

func (o *AttestationProperties) GetExpiresOnAsTime() (*time.Time, error)

func (*AttestationProperties) GetLastComplianceStateChangeAtAsTime

func (o *AttestationProperties) GetLastComplianceStateChangeAtAsTime() (*time.Time, error)

func (*AttestationProperties) SetAssessmentDateAsTime

func (o *AttestationProperties) SetAssessmentDateAsTime(input time.Time)

func (*AttestationProperties) SetExpiresOnAsTime

func (o *AttestationProperties) SetExpiresOnAsTime(input time.Time)

func (*AttestationProperties) SetLastComplianceStateChangeAtAsTime

func (o *AttestationProperties) SetLastComplianceStateChangeAtAsTime(input time.Time)

type AttestationsClient

type AttestationsClient struct {
	Client *resourcemanager.Client
}

func NewAttestationsClientWithBaseURI

func NewAttestationsClientWithBaseURI(sdkApi sdkEnv.Api) (*AttestationsClient, error)

func (AttestationsClient) AttestationsCreateOrUpdateAtResource

func (c AttestationsClient) AttestationsCreateOrUpdateAtResource(ctx context.Context, id ScopedAttestationId, input Attestation) (result AttestationsCreateOrUpdateAtResourceOperationResponse, err error)

AttestationsCreateOrUpdateAtResource ...

func (AttestationsClient) AttestationsCreateOrUpdateAtResourceGroup

func (c AttestationsClient) AttestationsCreateOrUpdateAtResourceGroup(ctx context.Context, id ProviderAttestationId, input Attestation) (result AttestationsCreateOrUpdateAtResourceGroupOperationResponse, err error)

AttestationsCreateOrUpdateAtResourceGroup ...

func (AttestationsClient) AttestationsCreateOrUpdateAtResourceGroupThenPoll

func (c AttestationsClient) AttestationsCreateOrUpdateAtResourceGroupThenPoll(ctx context.Context, id ProviderAttestationId, input Attestation) error

AttestationsCreateOrUpdateAtResourceGroupThenPoll performs AttestationsCreateOrUpdateAtResourceGroup then polls until it's completed

func (AttestationsClient) AttestationsCreateOrUpdateAtResourceThenPoll

func (c AttestationsClient) AttestationsCreateOrUpdateAtResourceThenPoll(ctx context.Context, id ScopedAttestationId, input Attestation) error

AttestationsCreateOrUpdateAtResourceThenPoll performs AttestationsCreateOrUpdateAtResource then polls until it's completed

func (AttestationsClient) AttestationsCreateOrUpdateAtSubscription

func (c AttestationsClient) AttestationsCreateOrUpdateAtSubscription(ctx context.Context, id AttestationId, input Attestation) (result AttestationsCreateOrUpdateAtSubscriptionOperationResponse, err error)

AttestationsCreateOrUpdateAtSubscription ...

func (AttestationsClient) AttestationsCreateOrUpdateAtSubscriptionThenPoll

func (c AttestationsClient) AttestationsCreateOrUpdateAtSubscriptionThenPoll(ctx context.Context, id AttestationId, input Attestation) error

AttestationsCreateOrUpdateAtSubscriptionThenPoll performs AttestationsCreateOrUpdateAtSubscription then polls until it's completed

func (AttestationsClient) AttestationsDeleteAtResource

func (c AttestationsClient) AttestationsDeleteAtResource(ctx context.Context, id ScopedAttestationId) (result AttestationsDeleteAtResourceOperationResponse, err error)

AttestationsDeleteAtResource ...

func (AttestationsClient) AttestationsDeleteAtResourceGroup

func (c AttestationsClient) AttestationsDeleteAtResourceGroup(ctx context.Context, id ProviderAttestationId) (result AttestationsDeleteAtResourceGroupOperationResponse, err error)

AttestationsDeleteAtResourceGroup ...

func (AttestationsClient) AttestationsDeleteAtSubscription

func (c AttestationsClient) AttestationsDeleteAtSubscription(ctx context.Context, id AttestationId) (result AttestationsDeleteAtSubscriptionOperationResponse, err error)

AttestationsDeleteAtSubscription ...

func (AttestationsClient) AttestationsGetAtResource

AttestationsGetAtResource ...

func (AttestationsClient) AttestationsGetAtResourceGroup

func (c AttestationsClient) AttestationsGetAtResourceGroup(ctx context.Context, id ProviderAttestationId) (result AttestationsGetAtResourceGroupOperationResponse, err error)

AttestationsGetAtResourceGroup ...

func (AttestationsClient) AttestationsGetAtSubscription

func (c AttestationsClient) AttestationsGetAtSubscription(ctx context.Context, id AttestationId) (result AttestationsGetAtSubscriptionOperationResponse, err error)

AttestationsGetAtSubscription ...

func (AttestationsClient) AttestationsListForResource

AttestationsListForResource ...

func (AttestationsClient) AttestationsListForResourceComplete

AttestationsListForResourceComplete retrieves all the results into a single object

func (AttestationsClient) AttestationsListForResourceCompleteMatchingPredicate

func (c AttestationsClient) AttestationsListForResourceCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options AttestationsListForResourceOperationOptions, predicate AttestationOperationPredicate) (result AttestationsListForResourceCompleteResult, err error)

AttestationsListForResourceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AttestationsClient) AttestationsListForResourceGroup

AttestationsListForResourceGroup ...

func (AttestationsClient) AttestationsListForResourceGroupComplete

AttestationsListForResourceGroupComplete retrieves all the results into a single object

func (AttestationsClient) AttestationsListForResourceGroupCompleteMatchingPredicate

AttestationsListForResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AttestationsClient) AttestationsListForSubscription

AttestationsListForSubscription ...

func (AttestationsClient) AttestationsListForSubscriptionComplete

AttestationsListForSubscriptionComplete retrieves all the results into a single object

func (AttestationsClient) AttestationsListForSubscriptionCompleteMatchingPredicate

AttestationsListForSubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

type AttestationsCreateOrUpdateAtResourceGroupOperationResponse

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

type AttestationsCreateOrUpdateAtResourceOperationResponse

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

type AttestationsCreateOrUpdateAtSubscriptionOperationResponse

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

type AttestationsDeleteAtResourceGroupOperationResponse

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

type AttestationsDeleteAtResourceOperationResponse

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

type AttestationsDeleteAtSubscriptionOperationResponse

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

type AttestationsGetAtResourceGroupOperationResponse

type AttestationsGetAtResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Attestation
}

type AttestationsGetAtResourceOperationResponse

type AttestationsGetAtResourceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Attestation
}

type AttestationsGetAtSubscriptionOperationResponse

type AttestationsGetAtSubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Attestation
}

type AttestationsListForResourceCompleteResult

type AttestationsListForResourceCompleteResult struct {
	Items []Attestation
}

type AttestationsListForResourceGroupCompleteResult

type AttestationsListForResourceGroupCompleteResult struct {
	Items []Attestation
}

type AttestationsListForResourceGroupOperationOptions

type AttestationsListForResourceGroupOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultAttestationsListForResourceGroupOperationOptions

func DefaultAttestationsListForResourceGroupOperationOptions() AttestationsListForResourceGroupOperationOptions

func (AttestationsListForResourceGroupOperationOptions) ToHeaders added in v0.20230809.1081239

func (AttestationsListForResourceGroupOperationOptions) ToOData added in v0.20230809.1081239

func (AttestationsListForResourceGroupOperationOptions) ToQuery added in v0.20230809.1081239

type AttestationsListForResourceGroupOperationResponse

type AttestationsListForResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Attestation
}

type AttestationsListForResourceOperationOptions

type AttestationsListForResourceOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultAttestationsListForResourceOperationOptions

func DefaultAttestationsListForResourceOperationOptions() AttestationsListForResourceOperationOptions

func (AttestationsListForResourceOperationOptions) ToHeaders added in v0.20230809.1081239

func (AttestationsListForResourceOperationOptions) ToOData added in v0.20230809.1081239

func (AttestationsListForResourceOperationOptions) ToQuery added in v0.20230809.1081239

type AttestationsListForResourceOperationResponse

type AttestationsListForResourceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Attestation
}

type AttestationsListForSubscriptionCompleteResult

type AttestationsListForSubscriptionCompleteResult struct {
	Items []Attestation
}

type AttestationsListForSubscriptionOperationOptions

type AttestationsListForSubscriptionOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultAttestationsListForSubscriptionOperationOptions

func DefaultAttestationsListForSubscriptionOperationOptions() AttestationsListForSubscriptionOperationOptions

func (AttestationsListForSubscriptionOperationOptions) ToHeaders added in v0.20230809.1081239

func (AttestationsListForSubscriptionOperationOptions) ToOData added in v0.20230809.1081239

func (AttestationsListForSubscriptionOperationOptions) ToQuery added in v0.20230809.1081239

type AttestationsListForSubscriptionOperationResponse

type AttestationsListForSubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Attestation
}

type ComplianceState

type ComplianceState string
const (
	ComplianceStateCompliant    ComplianceState = "Compliant"
	ComplianceStateNonCompliant ComplianceState = "NonCompliant"
	ComplianceStateUnknown      ComplianceState = "Unknown"
)

func (*ComplianceState) UnmarshalJSON added in v0.20230809.1081239

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

type ProviderAttestationId

type ProviderAttestationId struct {
	SubscriptionId    string
	ResourceGroupName string
	AttestationName   string
}

ProviderAttestationId is a struct representing the Resource ID for a Provider Attestation

func NewProviderAttestationID

func NewProviderAttestationID(subscriptionId string, resourceGroupName string, attestationName string) ProviderAttestationId

NewProviderAttestationID returns a new ProviderAttestationId struct

func ParseProviderAttestationID

func ParseProviderAttestationID(input string) (*ProviderAttestationId, error)

ParseProviderAttestationID parses 'input' into a ProviderAttestationId

func ParseProviderAttestationIDInsensitively

func ParseProviderAttestationIDInsensitively(input string) (*ProviderAttestationId, error)

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

func (ProviderAttestationId) ID

func (id ProviderAttestationId) ID() string

ID returns the formatted Provider Attestation ID

func (ProviderAttestationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Provider Attestation ID

func (ProviderAttestationId) String

func (id ProviderAttestationId) String() string

String returns a human-readable description of this Provider Attestation ID

type ScopedAttestationId

type ScopedAttestationId struct {
	ResourceId      string
	AttestationName string
}

ScopedAttestationId is a struct representing the Resource ID for a Scoped Attestation

func NewScopedAttestationID

func NewScopedAttestationID(resourceId string, attestationName string) ScopedAttestationId

NewScopedAttestationID returns a new ScopedAttestationId struct

func ParseScopedAttestationID

func ParseScopedAttestationID(input string) (*ScopedAttestationId, error)

ParseScopedAttestationID parses 'input' into a ScopedAttestationId

func ParseScopedAttestationIDInsensitively

func ParseScopedAttestationIDInsensitively(input string) (*ScopedAttestationId, error)

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

func (ScopedAttestationId) ID

func (id ScopedAttestationId) ID() string

ID returns the formatted Scoped Attestation ID

func (ScopedAttestationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Attestation ID

func (ScopedAttestationId) String

func (id ScopedAttestationId) String() string

String returns a human-readable description of this Scoped Attestation ID

Jump to

Keyboard shortcuts

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