attestations

package
v0.20240110.1133510 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 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.CreateOrUpdateAtResource

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

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


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

Example Usage: AttestationsClient.CreateOrUpdateAtResourceGroup

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

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


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

Example Usage: AttestationsClient.CreateOrUpdateAtSubscription

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

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


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

Example Usage: AttestationsClient.DeleteAtResource

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

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

Example Usage: AttestationsClient.DeleteAtResourceGroup

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

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

Example Usage: AttestationsClient.DeleteAtSubscription

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

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

Example Usage: AttestationsClient.GetAtResource

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

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

Example Usage: AttestationsClient.GetAtResourceGroup

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

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

Example Usage: AttestationsClient.GetAtSubscription

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

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

Example Usage: AttestationsClient.ListForResource

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

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

Example Usage: AttestationsClient.ListForResourceGroup

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

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

Example Usage: AttestationsClient.ListForSubscription

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

// alternatively `client.ListForSubscription(ctx, id, attestations.DefaultListForSubscriptionOperationOptions())` can be used to do batched pagination
items, err := client.ListForSubscriptionComplete(ctx, id, attestations.DefaultListForSubscriptionOperationOptions())
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) FromParseResult added in v0.20231127.1171502

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

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) CreateOrUpdateAtResource added in v0.20230906.1160501

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

CreateOrUpdateAtResource ...

func (AttestationsClient) CreateOrUpdateAtResourceGroup added in v0.20230906.1160501

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

CreateOrUpdateAtResourceGroup ...

func (AttestationsClient) CreateOrUpdateAtResourceGroupThenPoll added in v0.20230906.1160501

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

CreateOrUpdateAtResourceGroupThenPoll performs CreateOrUpdateAtResourceGroup then polls until it's completed

func (AttestationsClient) CreateOrUpdateAtResourceThenPoll added in v0.20230906.1160501

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

CreateOrUpdateAtResourceThenPoll performs CreateOrUpdateAtResource then polls until it's completed

func (AttestationsClient) CreateOrUpdateAtSubscription added in v0.20230906.1160501

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

CreateOrUpdateAtSubscription ...

func (AttestationsClient) CreateOrUpdateAtSubscriptionThenPoll added in v0.20230906.1160501

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

CreateOrUpdateAtSubscriptionThenPoll performs CreateOrUpdateAtSubscription then polls until it's completed

func (AttestationsClient) DeleteAtResource added in v0.20230906.1160501

DeleteAtResource ...

func (AttestationsClient) DeleteAtResourceGroup added in v0.20230906.1160501

DeleteAtResourceGroup ...

func (AttestationsClient) DeleteAtSubscription added in v0.20230906.1160501

func (c AttestationsClient) DeleteAtSubscription(ctx context.Context, id AttestationId) (result DeleteAtSubscriptionOperationResponse, err error)

DeleteAtSubscription ...

func (AttestationsClient) GetAtResource added in v0.20230906.1160501

GetAtResource ...

func (AttestationsClient) GetAtResourceGroup added in v0.20230906.1160501

GetAtResourceGroup ...

func (AttestationsClient) GetAtSubscription added in v0.20230906.1160501

func (c AttestationsClient) GetAtSubscription(ctx context.Context, id AttestationId) (result GetAtSubscriptionOperationResponse, err error)

GetAtSubscription ...

func (AttestationsClient) ListForResource added in v0.20230906.1160501

ListForResource ...

func (AttestationsClient) ListForResourceComplete added in v0.20230906.1160501

ListForResourceComplete retrieves all the results into a single object

func (AttestationsClient) ListForResourceCompleteMatchingPredicate added in v0.20230906.1160501

func (c AttestationsClient) ListForResourceCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListForResourceOperationOptions, predicate AttestationOperationPredicate) (result ListForResourceCompleteResult, err error)

ListForResourceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AttestationsClient) ListForResourceGroup added in v0.20230906.1160501

ListForResourceGroup ...

func (AttestationsClient) ListForResourceGroupComplete added in v0.20230906.1160501

ListForResourceGroupComplete retrieves all the results into a single object

func (AttestationsClient) ListForResourceGroupCompleteMatchingPredicate added in v0.20230906.1160501

func (c AttestationsClient) ListForResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListForResourceGroupOperationOptions, predicate AttestationOperationPredicate) (result ListForResourceGroupCompleteResult, err error)

ListForResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AttestationsClient) ListForSubscription added in v0.20230906.1160501

ListForSubscription ...

func (AttestationsClient) ListForSubscriptionComplete added in v0.20230906.1160501

ListForSubscriptionComplete retrieves all the results into a single object

func (AttestationsClient) ListForSubscriptionCompleteMatchingPredicate added in v0.20230906.1160501

func (c AttestationsClient) ListForSubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListForSubscriptionOperationOptions, predicate AttestationOperationPredicate) (result ListForSubscriptionCompleteResult, err error)

ListForSubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

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 CreateOrUpdateAtResourceGroupOperationResponse added in v0.20230906.1160501

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

type CreateOrUpdateAtResourceOperationResponse added in v0.20230906.1160501

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

type CreateOrUpdateAtSubscriptionOperationResponse added in v0.20230906.1160501

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

type DeleteAtResourceGroupOperationResponse added in v0.20230906.1160501

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

type DeleteAtResourceOperationResponse added in v0.20230906.1160501

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

type DeleteAtSubscriptionOperationResponse added in v0.20230906.1160501

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

type GetAtResourceGroupOperationResponse added in v0.20230906.1160501

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

type GetAtResourceOperationResponse added in v0.20230906.1160501

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

type GetAtSubscriptionOperationResponse added in v0.20230906.1160501

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

type ListForResourceCompleteResult added in v0.20230906.1160501

type ListForResourceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Attestation
}

type ListForResourceGroupCompleteResult added in v0.20230906.1160501

type ListForResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Attestation
}

type ListForResourceGroupOperationOptions added in v0.20230906.1160501

type ListForResourceGroupOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListForResourceGroupOperationOptions added in v0.20230906.1160501

func DefaultListForResourceGroupOperationOptions() ListForResourceGroupOperationOptions

func (ListForResourceGroupOperationOptions) ToHeaders added in v0.20230906.1160501

func (ListForResourceGroupOperationOptions) ToOData added in v0.20230906.1160501

func (ListForResourceGroupOperationOptions) ToQuery added in v0.20230906.1160501

type ListForResourceGroupOperationResponse added in v0.20230906.1160501

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

type ListForResourceOperationOptions added in v0.20230906.1160501

type ListForResourceOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListForResourceOperationOptions added in v0.20230906.1160501

func DefaultListForResourceOperationOptions() ListForResourceOperationOptions

func (ListForResourceOperationOptions) ToHeaders added in v0.20230906.1160501

func (ListForResourceOperationOptions) ToOData added in v0.20230906.1160501

func (ListForResourceOperationOptions) ToQuery added in v0.20230906.1160501

type ListForResourceOperationResponse added in v0.20230906.1160501

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

type ListForSubscriptionCompleteResult added in v0.20230906.1160501

type ListForSubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Attestation
}

type ListForSubscriptionOperationOptions added in v0.20230906.1160501

type ListForSubscriptionOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListForSubscriptionOperationOptions added in v0.20230906.1160501

func DefaultListForSubscriptionOperationOptions() ListForSubscriptionOperationOptions

func (ListForSubscriptionOperationOptions) ToHeaders added in v0.20230906.1160501

func (ListForSubscriptionOperationOptions) ToOData added in v0.20230906.1160501

func (ListForSubscriptionOperationOptions) ToQuery added in v0.20230906.1160501

type ListForSubscriptionOperationResponse added in v0.20230906.1160501

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

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) FromParseResult added in v0.20231127.1171502

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

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) FromParseResult added in v0.20231127.1171502

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

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