attestations

package
v0.20240126.1105227 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 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

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

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

CreateOrUpdateAtResource ...

func (AttestationsClient) CreateOrUpdateAtResourceGroup

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

CreateOrUpdateAtResourceGroup ...

func (AttestationsClient) CreateOrUpdateAtResourceGroupThenPoll

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

CreateOrUpdateAtResourceGroupThenPoll performs CreateOrUpdateAtResourceGroup then polls until it's completed

func (AttestationsClient) CreateOrUpdateAtResourceThenPoll

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

CreateOrUpdateAtResourceThenPoll performs CreateOrUpdateAtResource then polls until it's completed

func (AttestationsClient) CreateOrUpdateAtSubscription

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

CreateOrUpdateAtSubscription ...

func (AttestationsClient) CreateOrUpdateAtSubscriptionThenPoll

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

CreateOrUpdateAtSubscriptionThenPoll performs CreateOrUpdateAtSubscription then polls until it's completed

func (AttestationsClient) DeleteAtResource

DeleteAtResource ...

func (AttestationsClient) DeleteAtResourceGroup

DeleteAtResourceGroup ...

func (AttestationsClient) DeleteAtSubscription

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

DeleteAtSubscription ...

func (AttestationsClient) GetAtResource

GetAtResource ...

func (AttestationsClient) GetAtResourceGroup

GetAtResourceGroup ...

func (AttestationsClient) GetAtSubscription

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

GetAtSubscription ...

func (AttestationsClient) ListForResource

ListForResource ...

func (AttestationsClient) ListForResourceComplete

ListForResourceComplete retrieves all the results into a single object

func (AttestationsClient) ListForResourceCompleteMatchingPredicate

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

ListForResourceGroup ...

func (AttestationsClient) ListForResourceGroupComplete

ListForResourceGroupComplete retrieves all the results into a single object

func (AttestationsClient) ListForResourceGroupCompleteMatchingPredicate

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

ListForSubscription ...

func (AttestationsClient) ListForSubscriptionComplete

ListForSubscriptionComplete retrieves all the results into a single object

func (AttestationsClient) ListForSubscriptionCompleteMatchingPredicate

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

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

type CreateOrUpdateAtResourceGroupOperationResponse

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

type CreateOrUpdateAtResourceOperationResponse

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

type CreateOrUpdateAtSubscriptionOperationResponse

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

type DeleteAtResourceGroupOperationResponse

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

type DeleteAtResourceOperationResponse

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

type DeleteAtSubscriptionOperationResponse

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

type GetAtResourceGroupOperationResponse

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

type GetAtResourceOperationResponse

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

type GetAtSubscriptionOperationResponse

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

type ListForResourceCompleteResult

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

type ListForResourceGroupCompleteResult

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

type ListForResourceGroupOperationOptions

type ListForResourceGroupOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListForResourceGroupOperationOptions

func DefaultListForResourceGroupOperationOptions() ListForResourceGroupOperationOptions

func (ListForResourceGroupOperationOptions) ToHeaders

func (ListForResourceGroupOperationOptions) ToOData

func (ListForResourceGroupOperationOptions) ToQuery

type ListForResourceGroupOperationResponse

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

type ListForResourceOperationOptions

type ListForResourceOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListForResourceOperationOptions

func DefaultListForResourceOperationOptions() ListForResourceOperationOptions

func (ListForResourceOperationOptions) ToHeaders

func (ListForResourceOperationOptions) ToOData

func (ListForResourceOperationOptions) ToQuery

type ListForResourceOperationResponse

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

type ListForSubscriptionCompleteResult

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

type ListForSubscriptionOperationOptions

type ListForSubscriptionOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListForSubscriptionOperationOptions

func DefaultListForSubscriptionOperationOptions() ListForSubscriptionOperationOptions

func (ListForSubscriptionOperationOptions) ToHeaders

func (ListForSubscriptionOperationOptions) ToOData

func (ListForSubscriptionOperationOptions) ToQuery

type ListForSubscriptionOperationResponse

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

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

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