securitycontacts

package
v0.20240417.1084633 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2017-08-01-preview/securitycontacts Documentation

The securitycontacts SDK allows for interaction with the Azure Resource Manager Service security (API Version 2017-08-01-preview).

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/2017-08-01-preview/securitycontacts"

Client Initialization

client := securitycontacts.NewSecurityContactsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SecurityContactsClient.Create

ctx := context.TODO()
id := securitycontacts.NewSecurityContactID("12345678-1234-9876-4563-123456789012", "securityContactValue")

payload := securitycontacts.SecurityContact{
	// ...
}


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: SecurityContactsClient.Delete

ctx := context.TODO()
id := securitycontacts.NewSecurityContactID("12345678-1234-9876-4563-123456789012", "securityContactValue")

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

ctx := context.TODO()
id := securitycontacts.NewSecurityContactID("12345678-1234-9876-4563-123456789012", "securityContactValue")

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

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

// 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
}

Example Usage: SecurityContactsClient.Update

ctx := context.TODO()
id := securitycontacts.NewSecurityContactID("12345678-1234-9876-4563-123456789012", "securityContactValue")

payload := securitycontacts.SecurityContact{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAlertNotifications

func PossibleValuesForAlertNotifications() []string

func PossibleValuesForAlertsToAdmins

func PossibleValuesForAlertsToAdmins() []string

func ValidateSecurityContactID

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

ValidateSecurityContactID checks that 'input' can be parsed as a Security Contact ID

Types

type AlertNotifications

type AlertNotifications string
const (
	AlertNotificationsOff AlertNotifications = "Off"
	AlertNotificationsOn  AlertNotifications = "On"
)

func (*AlertNotifications) UnmarshalJSON added in v0.20240228.1142829

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

type AlertsToAdmins

type AlertsToAdmins string
const (
	AlertsToAdminsOff AlertsToAdmins = "Off"
	AlertsToAdminsOn  AlertsToAdmins = "On"
)

func (*AlertsToAdmins) UnmarshalJSON added in v0.20240228.1142829

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

type CreateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type SecurityContact

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

type SecurityContactId

type SecurityContactId struct {
	SubscriptionId      string
	SecurityContactName string
}

SecurityContactId is a struct representing the Resource ID for a Security Contact

func NewSecurityContactID

func NewSecurityContactID(subscriptionId string, securityContactName string) SecurityContactId

NewSecurityContactID returns a new SecurityContactId struct

func ParseSecurityContactID

func ParseSecurityContactID(input string) (*SecurityContactId, error)

ParseSecurityContactID parses 'input' into a SecurityContactId

func ParseSecurityContactIDInsensitively

func ParseSecurityContactIDInsensitively(input string) (*SecurityContactId, error)

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

func (*SecurityContactId) FromParseResult

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

func (SecurityContactId) ID

func (id SecurityContactId) ID() string

ID returns the formatted Security Contact ID

func (SecurityContactId) Segments

func (id SecurityContactId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Security Contact ID

func (SecurityContactId) String

func (id SecurityContactId) String() string

String returns a human-readable description of this Security Contact ID

type SecurityContactOperationPredicate

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

func (SecurityContactOperationPredicate) Matches

type SecurityContactProperties

type SecurityContactProperties struct {
	AlertNotifications AlertNotifications `json:"alertNotifications"`
	AlertsToAdmins     AlertsToAdmins     `json:"alertsToAdmins"`
	Email              string             `json:"email"`
	Phone              *string            `json:"phone,omitempty"`
}

type SecurityContactsClient

type SecurityContactsClient struct {
	Client *resourcemanager.Client
}

func NewSecurityContactsClientWithBaseURI

func NewSecurityContactsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecurityContactsClient, error)

func (SecurityContactsClient) Create

Create ...

func (SecurityContactsClient) Delete

Delete ...

func (SecurityContactsClient) Get

Get ...

func (SecurityContactsClient) List

List ...

func (SecurityContactsClient) ListComplete

ListComplete retrieves all the results into a single object

func (SecurityContactsClient) ListCompleteMatchingPredicate

func (c SecurityContactsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SecurityContactOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SecurityContactsClient) Update

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SecurityContact
}

Jump to

Keyboard shortcuts

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