securitystandards

package
v0.20241126.2320 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: 14 Imported by: 0

README

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

The securitystandards 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/securitystandards"

Client Initialization

client := securitystandards.NewSecurityStandardsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SecurityStandardsClient.CreateOrUpdate

ctx := context.TODO()
id := securitystandards.NewScopedSecurityStandardID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "standardId")

payload := securitystandards.SecurityStandard{
	// ...
}


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

Example Usage: SecurityStandardsClient.Delete

ctx := context.TODO()
id := securitystandards.NewScopedSecurityStandardID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "standardId")

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: SecurityStandardsClient.Get

ctx := context.TODO()
id := securitystandards.NewScopedSecurityStandardID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "standardId")

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: SecurityStandardsClient.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 PossibleValuesForStandardSupportedCloud

func PossibleValuesForStandardSupportedCloud() []string

func PossibleValuesForStandardType

func PossibleValuesForStandardType() []string

func ValidateScopedSecurityStandardID

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

ValidateScopedSecurityStandardID checks that 'input' can be parsed as a Scoped Security Standard ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SecurityStandard
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

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

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        *[]SecurityStandard
}

type PartialAssessmentProperties

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

type ScopedSecurityStandardId

type ScopedSecurityStandardId struct {
	Scope      string
	StandardId string
}

ScopedSecurityStandardId is a struct representing the Resource ID for a Scoped Security Standard

func NewScopedSecurityStandardID

func NewScopedSecurityStandardID(scope string, standardId string) ScopedSecurityStandardId

NewScopedSecurityStandardID returns a new ScopedSecurityStandardId struct

func ParseScopedSecurityStandardID

func ParseScopedSecurityStandardID(input string) (*ScopedSecurityStandardId, error)

ParseScopedSecurityStandardID parses 'input' into a ScopedSecurityStandardId

func ParseScopedSecurityStandardIDInsensitively

func ParseScopedSecurityStandardIDInsensitively(input string) (*ScopedSecurityStandardId, error)

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

func (*ScopedSecurityStandardId) FromParseResult

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

func (ScopedSecurityStandardId) ID

ID returns the formatted Scoped Security Standard ID

func (ScopedSecurityStandardId) Segments

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

func (ScopedSecurityStandardId) String

func (id ScopedSecurityStandardId) String() string

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

type SecurityStandard

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

type SecurityStandardOperationPredicate

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

func (SecurityStandardOperationPredicate) Matches

type SecurityStandardsClient

type SecurityStandardsClient struct {
	Client *resourcemanager.Client
}

func NewSecurityStandardsClientWithBaseURI

func NewSecurityStandardsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityStandardsClient, error)

func (SecurityStandardsClient) CreateOrUpdate

CreateOrUpdate ...

func (SecurityStandardsClient) Delete

Delete ...

func (SecurityStandardsClient) Get

Get ...

func (SecurityStandardsClient) List

List ...

func (SecurityStandardsClient) ListComplete

ListComplete retrieves all the results into a single object

func (SecurityStandardsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type StandardMetadata

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

func (*StandardMetadata) GetCreatedOnAsTime

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

func (*StandardMetadata) GetLastUpdatedOnAsTime

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

func (*StandardMetadata) SetCreatedOnAsTime

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

func (*StandardMetadata) SetLastUpdatedOnAsTime

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

type StandardProperties

type StandardProperties struct {
	Assessments           *[]PartialAssessmentProperties `json:"assessments,omitempty"`
	CloudProviders        *[]StandardSupportedCloud      `json:"cloudProviders,omitempty"`
	Description           *string                        `json:"description,omitempty"`
	DisplayName           *string                        `json:"displayName,omitempty"`
	Metadata              *StandardMetadata              `json:"metadata,omitempty"`
	PolicySetDefinitionId *string                        `json:"policySetDefinitionId,omitempty"`
	StandardType          *StandardType                  `json:"standardType,omitempty"`
}

type StandardSupportedCloud

type StandardSupportedCloud string
const (
	StandardSupportedCloudAWS   StandardSupportedCloud = "AWS"
	StandardSupportedCloudAzure StandardSupportedCloud = "Azure"
	StandardSupportedCloudGCP   StandardSupportedCloud = "GCP"
)

func (*StandardSupportedCloud) UnmarshalJSON

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

type StandardType

type StandardType string
const (
	StandardTypeCompliance StandardType = "Compliance"
	StandardTypeCustom     StandardType = "Custom"
	StandardTypeDefault    StandardType = "Default"
)

func (*StandardType) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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