standardassignments

package
v0.20241111.1164443 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2024-08-01/standardassignments Documentation

The standardassignments SDK allows for interaction with Azure Resource Manager security (API Version 2024-08-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/security/2024-08-01/standardassignments"

Client Initialization

client := standardassignments.NewStandardAssignmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: StandardAssignmentsClient.Create

ctx := context.TODO()
id := standardassignments.NewScopedStandardAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "standardAssignmentName")

payload := standardassignments.StandardAssignment{
	// ...
}


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

Example Usage: StandardAssignmentsClient.Delete

ctx := context.TODO()
id := standardassignments.NewScopedStandardAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "standardAssignmentName")

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

Example Usage: StandardAssignmentsClient.Get

ctx := context.TODO()
id := standardassignments.NewScopedStandardAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "standardAssignmentName")

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: StandardAssignmentsClient.List

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

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
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 PossibleValuesForAttestationComplianceState

func PossibleValuesForAttestationComplianceState() []string

func PossibleValuesForEffect

func PossibleValuesForEffect() []string

func PossibleValuesForExemptionCategory

func PossibleValuesForExemptionCategory() []string

func ValidateScopedStandardAssignmentID

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

ValidateScopedStandardAssignmentID checks that 'input' can be parsed as a Scoped Standard Assignment ID

Types

type AssignedAssessmentItem

type AssignedAssessmentItem struct {
	AssessmentKey *string `json:"assessmentKey,omitempty"`
}

type AssignedStandardItem

type AssignedStandardItem struct {
	Id *string `json:"id,omitempty"`
}

type AttestationComplianceState

type AttestationComplianceState string
const (
	AttestationComplianceStateCompliant    AttestationComplianceState = "compliant"
	AttestationComplianceStateNonCompliant AttestationComplianceState = "nonCompliant"
	AttestationComplianceStateUnknown      AttestationComplianceState = "unknown"
)

func (*AttestationComplianceState) UnmarshalJSON

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

type AttestationEvidence

type AttestationEvidence struct {
	Description *string `json:"description,omitempty"`
	SourceURL   *string `json:"sourceUrl,omitempty"`
}

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *StandardAssignment
}

type DeleteOperationResponse

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

type Effect

type Effect string
const (
	EffectAttest Effect = "Attest"
	EffectAudit  Effect = "Audit"
	EffectExempt Effect = "Exempt"
)

func (*Effect) UnmarshalJSON

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

type ExemptionCategory

type ExemptionCategory string
const (
	ExemptionCategoryMitigated ExemptionCategory = "mitigated"
	ExemptionCategoryWaiver    ExemptionCategory = "waiver"
)

func (*ExemptionCategory) UnmarshalJSON

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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []StandardAssignment
}

type ListCustomPager

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]StandardAssignment
}

type ScopedStandardAssignmentId

type ScopedStandardAssignmentId struct {
	ResourceId             string
	StandardAssignmentName string
}

ScopedStandardAssignmentId is a struct representing the Resource ID for a Scoped Standard Assignment

func NewScopedStandardAssignmentID

func NewScopedStandardAssignmentID(resourceId string, standardAssignmentName string) ScopedStandardAssignmentId

NewScopedStandardAssignmentID returns a new ScopedStandardAssignmentId struct

func ParseScopedStandardAssignmentID

func ParseScopedStandardAssignmentID(input string) (*ScopedStandardAssignmentId, error)

ParseScopedStandardAssignmentID parses 'input' into a ScopedStandardAssignmentId

func ParseScopedStandardAssignmentIDInsensitively

func ParseScopedStandardAssignmentIDInsensitively(input string) (*ScopedStandardAssignmentId, error)

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

func (*ScopedStandardAssignmentId) FromParseResult

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

func (ScopedStandardAssignmentId) ID

ID returns the formatted Scoped Standard Assignment ID

func (ScopedStandardAssignmentId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Standard Assignment ID

func (ScopedStandardAssignmentId) String

func (id ScopedStandardAssignmentId) String() string

String returns a human-readable description of this Scoped Standard Assignment ID

type StandardAssignment

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

type StandardAssignmentMetadata

type StandardAssignmentMetadata struct {
	CreatedBy     *string `json:"createdBy,omitempty"`
	CreatedOn     *string `json:"createdOn,omitempty"`
	LastUpdatedBy *string `json:"lastUpdatedBy,omitempty"`
	LastUpdatedOn *string `json:"lastUpdatedOn,omitempty"`
}

func (*StandardAssignmentMetadata) GetCreatedOnAsTime

func (o *StandardAssignmentMetadata) GetCreatedOnAsTime() (*time.Time, error)

func (*StandardAssignmentMetadata) GetLastUpdatedOnAsTime

func (o *StandardAssignmentMetadata) GetLastUpdatedOnAsTime() (*time.Time, error)

func (*StandardAssignmentMetadata) SetCreatedOnAsTime

func (o *StandardAssignmentMetadata) SetCreatedOnAsTime(input time.Time)

func (*StandardAssignmentMetadata) SetLastUpdatedOnAsTime

func (o *StandardAssignmentMetadata) SetLastUpdatedOnAsTime(input time.Time)

type StandardAssignmentOperationPredicate

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

func (StandardAssignmentOperationPredicate) Matches

type StandardAssignmentProperties

type StandardAssignmentProperties struct {
	AssignedStandard *AssignedStandardItem                        `json:"assignedStandard,omitempty"`
	AttestationData  *StandardAssignmentPropertiesAttestationData `json:"attestationData,omitempty"`
	Description      *string                                      `json:"description,omitempty"`
	DisplayName      *string                                      `json:"displayName,omitempty"`
	Effect           *Effect                                      `json:"effect,omitempty"`
	ExcludedScopes   *[]string                                    `json:"excludedScopes,omitempty"`
	ExemptionData    *StandardAssignmentPropertiesExemptionData   `json:"exemptionData,omitempty"`
	ExpiresOn        *string                                      `json:"expiresOn,omitempty"`
	Metadata         *StandardAssignmentMetadata                  `json:"metadata,omitempty"`
}

func (*StandardAssignmentProperties) GetExpiresOnAsTime

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

func (*StandardAssignmentProperties) SetExpiresOnAsTime

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

type StandardAssignmentPropertiesAttestationData

type StandardAssignmentPropertiesAttestationData struct {
	AssignedAssessment *AssignedAssessmentItem     `json:"assignedAssessment,omitempty"`
	ComplianceDate     *string                     `json:"complianceDate,omitempty"`
	ComplianceState    *AttestationComplianceState `json:"complianceState,omitempty"`
	Evidence           *[]AttestationEvidence      `json:"evidence,omitempty"`
}

func (*StandardAssignmentPropertiesAttestationData) GetComplianceDateAsTime

func (o *StandardAssignmentPropertiesAttestationData) GetComplianceDateAsTime() (*time.Time, error)

func (*StandardAssignmentPropertiesAttestationData) SetComplianceDateAsTime

func (o *StandardAssignmentPropertiesAttestationData) SetComplianceDateAsTime(input time.Time)

type StandardAssignmentPropertiesExemptionData

type StandardAssignmentPropertiesExemptionData struct {
	AssignedAssessment *AssignedAssessmentItem `json:"assignedAssessment,omitempty"`
	ExemptionCategory  *ExemptionCategory      `json:"exemptionCategory,omitempty"`
}

type StandardAssignmentsClient

type StandardAssignmentsClient struct {
	Client *resourcemanager.Client
}

func NewStandardAssignmentsClientWithBaseURI

func NewStandardAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*StandardAssignmentsClient, error)

func (StandardAssignmentsClient) Create

Create ...

func (StandardAssignmentsClient) Delete

Delete ...

func (StandardAssignmentsClient) Get

Get ...

func (StandardAssignmentsClient) List

List ...

func (StandardAssignmentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (StandardAssignmentsClient) ListCompleteMatchingPredicate

func (c StandardAssignmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate StandardAssignmentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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