jitrequests

package
v0.20230822.1132641 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/managedapplications/2021-07-01/jitrequests Documentation

The jitrequests SDK allows for interaction with the Azure Resource Manager Service managedapplications (API Version 2021-07-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/managedapplications/2021-07-01/jitrequests"

Client Initialization

client := jitrequests.NewJitRequestsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: JitRequestsClient.CreateOrUpdate

ctx := context.TODO()
id := jitrequests.NewJitRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jitRequestValue")

payload := jitrequests.JitRequestDefinition{
	// ...
}


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

Example Usage: JitRequestsClient.Delete

ctx := context.TODO()
id := jitrequests.NewJitRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jitRequestValue")

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

ctx := context.TODO()
id := jitrequests.NewJitRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jitRequestValue")

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: JitRequestsClient.ListByResourceGroup

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

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

Example Usage: JitRequestsClient.ListBySubscription

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

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

Example Usage: JitRequestsClient.Update

ctx := context.TODO()
id := jitrequests.NewJitRequestID("12345678-1234-9876-4563-123456789012", "example-resource-group", "jitRequestValue")

payload := jitrequests.JitRequestPatchable{
	// ...
}


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 PossibleValuesForJitRequestState

func PossibleValuesForJitRequestState() []string

func PossibleValuesForJitSchedulingType

func PossibleValuesForJitSchedulingType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateJitRequestID

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

ValidateJitRequestID checks that 'input' can be parsed as a Jit Request ID

Types

type ApplicationClientDetails

type ApplicationClientDetails struct {
	ApplicationId *string `json:"applicationId,omitempty"`
	Oid           *string `json:"oid,omitempty"`
	Puid          *string `json:"puid,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type JitAuthorizationPolicies

type JitAuthorizationPolicies struct {
	PrincipalId      string `json:"principalId"`
	RoleDefinitionId string `json:"roleDefinitionId"`
}

type JitRequestDefinition

type JitRequestDefinition struct {
	Id         *string                `json:"id,omitempty"`
	Location   *string                `json:"location,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *JitRequestProperties  `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type JitRequestDefinitionListResult

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

type JitRequestId

type JitRequestId struct {
	SubscriptionId    string
	ResourceGroupName string
	JitRequestName    string
}

JitRequestId is a struct representing the Resource ID for a Jit Request

func NewJitRequestID

func NewJitRequestID(subscriptionId string, resourceGroupName string, jitRequestName string) JitRequestId

NewJitRequestID returns a new JitRequestId struct

func ParseJitRequestID

func ParseJitRequestID(input string) (*JitRequestId, error)

ParseJitRequestID parses 'input' into a JitRequestId

func ParseJitRequestIDInsensitively

func ParseJitRequestIDInsensitively(input string) (*JitRequestId, error)

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

func (JitRequestId) ID

func (id JitRequestId) ID() string

ID returns the formatted Jit Request ID

func (JitRequestId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Jit Request ID

func (JitRequestId) String

func (id JitRequestId) String() string

String returns a human-readable description of this Jit Request ID

type JitRequestPatchable

type JitRequestPatchable struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type JitRequestProperties

type JitRequestProperties struct {
	ApplicationResourceId    string                     `json:"applicationResourceId"`
	CreatedBy                *ApplicationClientDetails  `json:"createdBy,omitempty"`
	JitAuthorizationPolicies []JitAuthorizationPolicies `json:"jitAuthorizationPolicies"`
	JitRequestState          *JitRequestState           `json:"jitRequestState,omitempty"`
	JitSchedulingPolicy      JitSchedulingPolicy        `json:"jitSchedulingPolicy"`
	ProvisioningState        *ProvisioningState         `json:"provisioningState,omitempty"`
	PublisherTenantId        *string                    `json:"publisherTenantId,omitempty"`
	UpdatedBy                *ApplicationClientDetails  `json:"updatedBy,omitempty"`
}

type JitRequestState

type JitRequestState string
const (
	JitRequestStateApproved     JitRequestState = "Approved"
	JitRequestStateCanceled     JitRequestState = "Canceled"
	JitRequestStateDenied       JitRequestState = "Denied"
	JitRequestStateExpired      JitRequestState = "Expired"
	JitRequestStateFailed       JitRequestState = "Failed"
	JitRequestStateNotSpecified JitRequestState = "NotSpecified"
	JitRequestStatePending      JitRequestState = "Pending"
	JitRequestStateTimeout      JitRequestState = "Timeout"
)

func (*JitRequestState) UnmarshalJSON

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

type JitRequestsClient

type JitRequestsClient struct {
	Client *resourcemanager.Client
}

func NewJitRequestsClientWithBaseURI

func NewJitRequestsClientWithBaseURI(sdkApi sdkEnv.Api) (*JitRequestsClient, error)

func (JitRequestsClient) CreateOrUpdate

CreateOrUpdate ...

func (JitRequestsClient) CreateOrUpdateThenPoll

func (c JitRequestsClient) CreateOrUpdateThenPoll(ctx context.Context, id JitRequestId, input JitRequestDefinition) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (JitRequestsClient) Delete

Delete ...

func (JitRequestsClient) Get

Get ...

func (JitRequestsClient) ListByResourceGroup

ListByResourceGroup ...

func (JitRequestsClient) ListBySubscription

ListBySubscription ...

func (JitRequestsClient) Update

Update ...

type JitSchedulingPolicy

type JitSchedulingPolicy struct {
	Duration  string            `json:"duration"`
	StartTime string            `json:"startTime"`
	Type      JitSchedulingType `json:"type"`
}

func (*JitSchedulingPolicy) GetStartTimeAsTime

func (o *JitSchedulingPolicy) GetStartTimeAsTime() (*time.Time, error)

func (*JitSchedulingPolicy) SetStartTimeAsTime

func (o *JitSchedulingPolicy) SetStartTimeAsTime(input time.Time)

type JitSchedulingType

type JitSchedulingType string
const (
	JitSchedulingTypeNotSpecified JitSchedulingType = "NotSpecified"
	JitSchedulingTypeOnce         JitSchedulingType = "Once"
	JitSchedulingTypeRecurring    JitSchedulingType = "Recurring"
)

func (*JitSchedulingType) UnmarshalJSON

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *JitRequestDefinitionListResult
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *JitRequestDefinitionListResult
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateRunning      ProvisioningState = "Running"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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