portalconfig

package
v0.20231005.1153009 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/portalconfig Documentation

The portalconfig SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2022-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-sdk/resource-manager/apimanagement/2022-08-01/portalconfig"

Client Initialization

client := portalconfig.NewPortalConfigClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PortalConfigClient.CreateOrUpdate

ctx := context.TODO()
id := portalconfig.NewPortalConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalConfigIdValue")

payload := portalconfig.PortalConfigContract{
	// ...
}


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

Example Usage: PortalConfigClient.Get

ctx := context.TODO()
id := portalconfig.NewPortalConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalConfigIdValue")

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: PortalConfigClient.GetEntityTag

ctx := context.TODO()
id := portalconfig.NewPortalConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalConfigIdValue")

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

Example Usage: PortalConfigClient.ListByService

ctx := context.TODO()
id := portalconfig.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")

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

Example Usage: PortalConfigClient.Update

ctx := context.TODO()
id := portalconfig.NewPortalConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "portalConfigIdValue")

payload := portalconfig.PortalConfigContract{
	// ...
}


read, err := client.Update(ctx, id, payload, portalconfig.DefaultUpdateOperationOptions())
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 PossibleValuesForPortalSettingsCspMode

func PossibleValuesForPortalSettingsCspMode() []string

func ValidatePortalConfigID

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

ValidatePortalConfigID checks that 'input' can be parsed as a Portal Config ID

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230801.1071415

type CreateOrUpdateOperationResponse

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

type GetEntityTagOperationResponse

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

type GetOperationResponse

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

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PortalConfigCollection
}

type PortalConfigClient

type PortalConfigClient struct {
	Client *resourcemanager.Client
}

func NewPortalConfigClientWithBaseURI

func NewPortalConfigClientWithBaseURI(sdkApi sdkEnv.Api) (*PortalConfigClient, error)

func (PortalConfigClient) CreateOrUpdate

CreateOrUpdate ...

func (PortalConfigClient) Get

Get ...

func (PortalConfigClient) GetEntityTag

GetEntityTag ...

func (PortalConfigClient) ListByService

func (c PortalConfigClient) ListByService(ctx context.Context, id ServiceId) (result ListByServiceOperationResponse, err error)

ListByService ...

func (PortalConfigClient) Update

Update ...

type PortalConfigCollection

type PortalConfigCollection struct {
	NextLink *string                 `json:"nextLink,omitempty"`
	Value    *[]PortalConfigContract `json:"value,omitempty"`
}

type PortalConfigContract

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

type PortalConfigCorsProperties

type PortalConfigCorsProperties struct {
	AllowedOrigins *[]string `json:"allowedOrigins,omitempty"`
}

type PortalConfigCspProperties

type PortalConfigCspProperties struct {
	AllowedSources *[]string              `json:"allowedSources,omitempty"`
	Mode           *PortalSettingsCspMode `json:"mode,omitempty"`
	ReportUri      *[]string              `json:"reportUri,omitempty"`
}

type PortalConfigDelegationProperties

type PortalConfigDelegationProperties struct {
	DelegateRegistration *bool   `json:"delegateRegistration,omitempty"`
	DelegateSubscription *bool   `json:"delegateSubscription,omitempty"`
	DelegationUrl        *string `json:"delegationUrl,omitempty"`
	ValidationKey        *string `json:"validationKey,omitempty"`
}

type PortalConfigId

type PortalConfigId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	PortalConfigId    string
}

PortalConfigId is a struct representing the Resource ID for a Portal Config

func NewPortalConfigID

func NewPortalConfigID(subscriptionId string, resourceGroupName string, serviceName string, portalConfigId string) PortalConfigId

NewPortalConfigID returns a new PortalConfigId struct

func ParsePortalConfigID

func ParsePortalConfigID(input string) (*PortalConfigId, error)

ParsePortalConfigID parses 'input' into a PortalConfigId

func ParsePortalConfigIDInsensitively

func ParsePortalConfigIDInsensitively(input string) (*PortalConfigId, error)

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

func (PortalConfigId) ID

func (id PortalConfigId) ID() string

ID returns the formatted Portal Config ID

func (PortalConfigId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Portal Config ID

func (PortalConfigId) String

func (id PortalConfigId) String() string

String returns a human-readable description of this Portal Config ID

type PortalConfigProperties

type PortalConfigProperties struct {
	Cors            *PortalConfigCorsProperties       `json:"cors,omitempty"`
	Csp             *PortalConfigCspProperties        `json:"csp,omitempty"`
	Delegation      *PortalConfigDelegationProperties `json:"delegation,omitempty"`
	EnableBasicAuth *bool                             `json:"enableBasicAuth,omitempty"`
	Signin          *PortalConfigPropertiesSignin     `json:"signin,omitempty"`
	Signup          *PortalConfigPropertiesSignup     `json:"signup,omitempty"`
}

type PortalConfigPropertiesSignin

type PortalConfigPropertiesSignin struct {
	Require *bool `json:"require,omitempty"`
}

type PortalConfigPropertiesSignup

type PortalConfigPropertiesSignup struct {
	TermsOfService *PortalConfigTermsOfServiceProperties `json:"termsOfService,omitempty"`
}

type PortalConfigTermsOfServiceProperties

type PortalConfigTermsOfServiceProperties struct {
	RequireConsent *bool   `json:"requireConsent,omitempty"`
	Text           *string `json:"text,omitempty"`
}

type PortalSettingsCspMode

type PortalSettingsCspMode string
const (
	PortalSettingsCspModeDisabled   PortalSettingsCspMode = "disabled"
	PortalSettingsCspModeEnabled    PortalSettingsCspMode = "enabled"
	PortalSettingsCspModeReportOnly PortalSettingsCspMode = "reportOnly"
)

func (*PortalSettingsCspMode) UnmarshalJSON added in v0.20230801.1071415

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

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders added in v0.20230801.1071415

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData added in v0.20230801.1071415

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery added in v0.20230801.1071415

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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