advancedthreatprotectionsettings

package
v0.20240131.1085516 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings Documentation

The advancedthreatprotectionsettings SDK allows for interaction with the Azure Resource Manager Service postgresql (API Version 2023-06-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-sdk/resource-manager/postgresql/2023-06-01-preview/advancedthreatprotectionsettings"

Client Initialization

client := advancedthreatprotectionsettings.NewAdvancedThreatProtectionSettingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AdvancedThreatProtectionSettingsClient.ServerThreatProtectionSettingsCreateOrUpdate

ctx := context.TODO()
id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue")

payload := advancedthreatprotectionsettings.ServerThreatProtectionSettingsModel{
	// ...
}


if err := client.ServerThreatProtectionSettingsCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: AdvancedThreatProtectionSettingsClient.ServerThreatProtectionSettingsGet

ctx := context.TODO()
id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue")

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

Example Usage: AdvancedThreatProtectionSettingsClient.ServerThreatProtectionSettingsListByServer

ctx := context.TODO()
id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerValue")

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

func PossibleValuesForThreatProtectionState() []string

func ValidateFlexibleServerID

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

ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID

Types

type AdvancedThreatProtectionSettingsClient

type AdvancedThreatProtectionSettingsClient struct {
	Client *resourcemanager.Client
}

func NewAdvancedThreatProtectionSettingsClientWithBaseURI

func NewAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvancedThreatProtectionSettingsClient, error)

func (AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsCreateOrUpdate

ServerThreatProtectionSettingsCreateOrUpdate ...

func (AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsCreateOrUpdateThenPoll

func (c AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsCreateOrUpdateThenPoll(ctx context.Context, id FlexibleServerId, input ServerThreatProtectionSettingsModel) error

ServerThreatProtectionSettingsCreateOrUpdateThenPoll performs ServerThreatProtectionSettingsCreateOrUpdate then polls until it's completed

func (AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsGet

ServerThreatProtectionSettingsGet ...

func (AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsListByServer

ServerThreatProtectionSettingsListByServer ...

func (AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsListByServerComplete

ServerThreatProtectionSettingsListByServerComplete retrieves all the results into a single object

func (AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsListByServerCompleteMatchingPredicate

ServerThreatProtectionSettingsListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

type FlexibleServerId

type FlexibleServerId struct {
	SubscriptionId     string
	ResourceGroupName  string
	FlexibleServerName string
}

FlexibleServerId is a struct representing the Resource ID for a Flexible Server

func NewFlexibleServerID

func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId

NewFlexibleServerID returns a new FlexibleServerId struct

func ParseFlexibleServerID

func ParseFlexibleServerID(input string) (*FlexibleServerId, error)

ParseFlexibleServerID parses 'input' into a FlexibleServerId

func ParseFlexibleServerIDInsensitively

func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error)

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

func (*FlexibleServerId) FromParseResult

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

func (FlexibleServerId) ID

func (id FlexibleServerId) ID() string

ID returns the formatted Flexible Server ID

func (FlexibleServerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID

func (FlexibleServerId) String

func (id FlexibleServerId) String() string

String returns a human-readable description of this Flexible Server ID

type ServerThreatProtectionProperties

type ServerThreatProtectionProperties struct {
	CreationTime *string               `json:"creationTime,omitempty"`
	State        ThreatProtectionState `json:"state"`
}

func (*ServerThreatProtectionProperties) GetCreationTimeAsTime

func (o *ServerThreatProtectionProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*ServerThreatProtectionProperties) SetCreationTimeAsTime

func (o *ServerThreatProtectionProperties) SetCreationTimeAsTime(input time.Time)

type ServerThreatProtectionSettingsCreateOrUpdateOperationResponse

type ServerThreatProtectionSettingsCreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerThreatProtectionSettingsModel
}

type ServerThreatProtectionSettingsGetOperationResponse

type ServerThreatProtectionSettingsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerThreatProtectionSettingsModel
}

type ServerThreatProtectionSettingsListByServerCompleteResult

type ServerThreatProtectionSettingsListByServerCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ServerThreatProtectionSettingsModel
}

type ServerThreatProtectionSettingsListByServerOperationResponse

type ServerThreatProtectionSettingsListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ServerThreatProtectionSettingsModel
}

type ServerThreatProtectionSettingsModel

type ServerThreatProtectionSettingsModel struct {
	Id         *string                           `json:"id,omitempty"`
	Name       *string                           `json:"name,omitempty"`
	Properties *ServerThreatProtectionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData            `json:"systemData,omitempty"`
	Type       *string                           `json:"type,omitempty"`
}

type ServerThreatProtectionSettingsModelOperationPredicate

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

func (ServerThreatProtectionSettingsModelOperationPredicate) Matches

type ThreatProtectionState

type ThreatProtectionState string
const (
	ThreatProtectionStateDisabled ThreatProtectionState = "Disabled"
	ThreatProtectionStateEnabled  ThreatProtectionState = "Enabled"
)

func (*ThreatProtectionState) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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