README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/adminrulecollections
Documentation
The adminrulecollections
SDK allows for interaction with Azure Resource Manager network
(API Version 2023-11-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/network/2023-11-01/adminrulecollections"
Client Initialization
client := adminrulecollections.NewAdminRuleCollectionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: AdminRuleCollectionsClient.CreateOrUpdate
ctx := context.TODO()
id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName", "ruleCollectionName")
payload := adminrulecollections.AdminRuleCollection{
// ...
}
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: AdminRuleCollectionsClient.Delete
ctx := context.TODO()
id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName", "ruleCollectionName")
if err := client.DeleteThenPoll(ctx, id, adminrulecollections.DefaultDeleteOperationOptions()); err != nil {
// handle the error
}
Example Usage: AdminRuleCollectionsClient.Get
ctx := context.TODO()
id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName", "ruleCollectionName")
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: AdminRuleCollectionsClient.List
ctx := context.TODO()
id := adminrulecollections.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerName", "securityAdminConfigurationName")
// alternatively `client.List(ctx, id, adminrulecollections.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, adminrulecollections.DefaultListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Documentation ¶
Index ¶
- func PossibleValuesForProvisioningState() []string
- func ValidateRuleCollectionID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateSecurityAdminConfigurationID(input interface{}, key string) (warnings []string, errors []error)
- type AdminRuleCollection
- type AdminRuleCollectionOperationPredicate
- type AdminRuleCollectionPropertiesFormat
- type AdminRuleCollectionsClient
- func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleCollectionId, input AdminRuleCollection) (result CreateOrUpdateOperationResponse, err error)
- func (c AdminRuleCollectionsClient) Delete(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
- func (c AdminRuleCollectionsClient) DeleteThenPoll(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) error
- func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId) (result GetOperationResponse, err error)
- func (c AdminRuleCollectionsClient) List(ctx context.Context, id SecurityAdminConfigurationId, ...) (result ListOperationResponse, err error)
- func (c AdminRuleCollectionsClient) ListComplete(ctx context.Context, id SecurityAdminConfigurationId, ...) (ListCompleteResult, error)
- func (c AdminRuleCollectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id SecurityAdminConfigurationId, ...) (result ListCompleteResult, err error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationOptions
- type DeleteOperationResponse
- type GetOperationResponse
- type ListCompleteResult
- type ListCustomPager
- type ListOperationOptions
- type ListOperationResponse
- type NetworkManagerSecurityGroupItem
- type ProvisioningState
- type RuleCollectionId
- type SecurityAdminConfigurationId
- func NewSecurityAdminConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, ...) SecurityAdminConfigurationId
- func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfigurationId, error)
- func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdminConfigurationId, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func ValidateRuleCollectionID ¶
ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID
func ValidateSecurityAdminConfigurationID ¶
func ValidateSecurityAdminConfigurationID(input interface{}, key string) (warnings []string, errors []error)
ValidateSecurityAdminConfigurationID checks that 'input' can be parsed as a Security Admin Configuration ID
Types ¶
type AdminRuleCollection ¶
type AdminRuleCollection struct { Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *AdminRuleCollectionPropertiesFormat `json:"properties,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Type *string `json:"type,omitempty"` }
type AdminRuleCollectionOperationPredicate ¶
type AdminRuleCollectionOperationPredicate struct { Etag *string Id *string Name *string Type *string }
func (AdminRuleCollectionOperationPredicate) Matches ¶
func (p AdminRuleCollectionOperationPredicate) Matches(input AdminRuleCollection) bool
type AdminRuleCollectionPropertiesFormat ¶
type AdminRuleCollectionPropertiesFormat struct { AppliesToGroups []NetworkManagerSecurityGroupItem `json:"appliesToGroups"` Description *string `json:"description,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` ResourceGuid *string `json:"resourceGuid,omitempty"` }
type AdminRuleCollectionsClient ¶
type AdminRuleCollectionsClient struct {
Client *resourcemanager.Client
}
func NewAdminRuleCollectionsClientWithBaseURI ¶
func NewAdminRuleCollectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdminRuleCollectionsClient, error)
func (AdminRuleCollectionsClient) CreateOrUpdate ¶
func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleCollectionId, input AdminRuleCollection) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (AdminRuleCollectionsClient) Delete ¶
func (c AdminRuleCollectionsClient) Delete(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
Delete ...
func (AdminRuleCollectionsClient) DeleteThenPoll ¶
func (c AdminRuleCollectionsClient) DeleteThenPoll(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) error
DeleteThenPoll performs Delete then polls until it's completed
func (AdminRuleCollectionsClient) Get ¶
func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId) (result GetOperationResponse, err error)
Get ...
func (AdminRuleCollectionsClient) List ¶
func (c AdminRuleCollectionsClient) List(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions) (result ListOperationResponse, err error)
List ...
func (AdminRuleCollectionsClient) ListComplete ¶
func (c AdminRuleCollectionsClient) ListComplete(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions) (ListCompleteResult, error)
ListComplete retrieves all the results into a single object
func (AdminRuleCollectionsClient) ListCompleteMatchingPredicate ¶
func (c AdminRuleCollectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions, predicate AdminRuleCollectionOperationPredicate) (result ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all the results and then applies the predicate
type CreateOrUpdateOperationResponse ¶
type CreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *AdminRuleCollection }
type DeleteOperationOptions ¶
type DeleteOperationOptions struct {
Force *bool
}
func DefaultDeleteOperationOptions ¶
func DefaultDeleteOperationOptions() DeleteOperationOptions
func (DeleteOperationOptions) ToHeaders ¶
func (o DeleteOperationOptions) ToHeaders() *client.Headers
func (DeleteOperationOptions) ToOData ¶
func (o DeleteOperationOptions) ToOData() *odata.Query
func (DeleteOperationOptions) ToQuery ¶
func (o DeleteOperationOptions) ToQuery() *client.QueryParams
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *AdminRuleCollection }
type ListCompleteResult ¶
type ListCompleteResult struct { LatestHttpResponse *http.Response Items []AdminRuleCollection }
type ListCustomPager ¶
func (*ListCustomPager) NextPageLink ¶
func (p *ListCustomPager) NextPageLink() *odata.Link
type ListOperationOptions ¶
type ListOperationOptions struct {
Top *int64
}
func DefaultListOperationOptions ¶
func DefaultListOperationOptions() ListOperationOptions
func (ListOperationOptions) ToHeaders ¶
func (o ListOperationOptions) ToHeaders() *client.Headers
func (ListOperationOptions) ToOData ¶
func (o ListOperationOptions) ToOData() *odata.Query
func (ListOperationOptions) ToQuery ¶
func (o ListOperationOptions) ToQuery() *client.QueryParams
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]AdminRuleCollection }
type NetworkManagerSecurityGroupItem ¶
type NetworkManagerSecurityGroupItem struct {
NetworkGroupId string `json:"networkGroupId"`
}
type ProvisioningState ¶
type ProvisioningState string
const ( ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func (*ProvisioningState) UnmarshalJSON ¶
func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error
type RuleCollectionId ¶
type RuleCollectionId struct { SubscriptionId string ResourceGroupName string NetworkManagerName string SecurityAdminConfigurationName string RuleCollectionName string }
RuleCollectionId is a struct representing the Resource ID for a Rule Collection
func NewRuleCollectionID ¶
func NewRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string) RuleCollectionId
NewRuleCollectionID returns a new RuleCollectionId struct
func ParseRuleCollectionID ¶
func ParseRuleCollectionID(input string) (*RuleCollectionId, error)
ParseRuleCollectionID parses 'input' into a RuleCollectionId
func ParseRuleCollectionIDInsensitively ¶
func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error)
ParseRuleCollectionIDInsensitively parses 'input' case-insensitively into a RuleCollectionId note: this method should only be used for API response data and not user input
func (*RuleCollectionId) FromParseResult ¶
func (id *RuleCollectionId) FromParseResult(input resourceids.ParseResult) error
func (RuleCollectionId) ID ¶
func (id RuleCollectionId) ID() string
ID returns the formatted Rule Collection ID
func (RuleCollectionId) Segments ¶
func (id RuleCollectionId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Rule Collection ID
func (RuleCollectionId) String ¶
func (id RuleCollectionId) String() string
String returns a human-readable description of this Rule Collection ID
type SecurityAdminConfigurationId ¶
type SecurityAdminConfigurationId struct { SubscriptionId string ResourceGroupName string NetworkManagerName string SecurityAdminConfigurationName string }
SecurityAdminConfigurationId is a struct representing the Resource ID for a Security Admin Configuration
func NewSecurityAdminConfigurationID ¶
func NewSecurityAdminConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string) SecurityAdminConfigurationId
NewSecurityAdminConfigurationID returns a new SecurityAdminConfigurationId struct
func ParseSecurityAdminConfigurationID ¶
func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfigurationId, error)
ParseSecurityAdminConfigurationID parses 'input' into a SecurityAdminConfigurationId
func ParseSecurityAdminConfigurationIDInsensitively ¶
func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdminConfigurationId, error)
ParseSecurityAdminConfigurationIDInsensitively parses 'input' case-insensitively into a SecurityAdminConfigurationId note: this method should only be used for API response data and not user input
func (*SecurityAdminConfigurationId) FromParseResult ¶
func (id *SecurityAdminConfigurationId) FromParseResult(input resourceids.ParseResult) error
func (SecurityAdminConfigurationId) ID ¶
func (id SecurityAdminConfigurationId) ID() string
ID returns the formatted Security Admin Configuration ID
func (SecurityAdminConfigurationId) Segments ¶
func (id SecurityAdminConfigurationId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Security Admin Configuration ID
func (SecurityAdminConfigurationId) String ¶
func (id SecurityAdminConfigurationId) String() string
String returns a human-readable description of this Security Admin Configuration ID