workspacemanagerassignments

package
v0.20250110.1074108 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2023-12-01-preview/workspacemanagerassignments Documentation

The workspacemanagerassignments SDK allows for interaction with Azure Resource Manager securityinsights (API Version 2023-12-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/securityinsights/2023-12-01-preview/workspacemanagerassignments"

Client Initialization

client := workspacemanagerassignments.NewWorkspaceManagerAssignmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: WorkspaceManagerAssignmentsClient.CreateOrUpdate

ctx := context.TODO()
id := workspacemanagerassignments.NewWorkspaceManagerAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "workspaceManagerAssignmentName")

payload := workspacemanagerassignments.WorkspaceManagerAssignment{
	// ...
}


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

ctx := context.TODO()
id := workspacemanagerassignments.NewWorkspaceManagerAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "workspaceManagerAssignmentName")

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

ctx := context.TODO()
id := workspacemanagerassignments.NewWorkspaceManagerAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "workspaceManagerAssignmentName")

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

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

// alternatively `client.List(ctx, id, workspacemanagerassignments.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, workspacemanagerassignments.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: WorkspaceManagerAssignmentsClient.WorkspaceManagerAssignmentJobsCreate

ctx := context.TODO()
id := workspacemanagerassignments.NewWorkspaceManagerAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "workspaceManagerAssignmentName")

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

Example Usage: WorkspaceManagerAssignmentsClient.WorkspaceManagerAssignmentJobsDelete

ctx := context.TODO()
id := workspacemanagerassignments.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "workspaceManagerAssignmentName", "jobName")

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

Example Usage: WorkspaceManagerAssignmentsClient.WorkspaceManagerAssignmentJobsGet

ctx := context.TODO()
id := workspacemanagerassignments.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "workspaceManagerAssignmentName", "jobName")

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

Example Usage: WorkspaceManagerAssignmentsClient.WorkspaceManagerAssignmentJobsList

ctx := context.TODO()
id := workspacemanagerassignments.NewWorkspaceManagerAssignmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "workspaceManagerAssignmentName")

// alternatively `client.WorkspaceManagerAssignmentJobsList(ctx, id, workspacemanagerassignments.DefaultWorkspaceManagerAssignmentJobsListOperationOptions())` can be used to do batched pagination
items, err := client.WorkspaceManagerAssignmentJobsListComplete(ctx, id, workspacemanagerassignments.DefaultWorkspaceManagerAssignmentJobsListOperationOptions())
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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateJobID

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

ValidateJobID checks that 'input' can be parsed as a Job ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

func ValidateWorkspaceManagerAssignmentID

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

ValidateWorkspaceManagerAssignmentID checks that 'input' can be parsed as a Workspace Manager Assignment ID

Types

type AssignmentItem

type AssignmentItem struct {
	ResourceId *string `json:"resourceId,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Error

type Error struct {
	ErrorMessage       string `json:"errorMessage"`
	MemberResourceName string `json:"memberResourceName"`
}

type GetOperationResponse

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

type Job

type Job struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *JobProperties         `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type JobId

type JobId struct {
	SubscriptionId                 string
	ResourceGroupName              string
	WorkspaceName                  string
	WorkspaceManagerAssignmentName string
	JobName                        string
}

JobId is a struct representing the Resource ID for a Job

func NewJobID

func NewJobID(subscriptionId string, resourceGroupName string, workspaceName string, workspaceManagerAssignmentName string, jobName string) JobId

NewJobID returns a new JobId struct

func ParseJobID

func ParseJobID(input string) (*JobId, error)

ParseJobID parses 'input' into a JobId

func ParseJobIDInsensitively

func ParseJobIDInsensitively(input string) (*JobId, error)

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

func (*JobId) FromParseResult

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

func (JobId) ID

func (id JobId) ID() string

ID returns the formatted Job ID

func (JobId) Segments

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

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

func (JobId) String

func (id JobId) String() string

String returns a human-readable description of this Job ID

type JobItem

type JobItem struct {
	Errors        *[]Error `json:"errors,omitempty"`
	ExecutionTime *string  `json:"executionTime,omitempty"`
	ResourceId    *string  `json:"resourceId,omitempty"`
	Status        *Status  `json:"status,omitempty"`
}

func (*JobItem) GetExecutionTimeAsTime

func (o *JobItem) GetExecutionTimeAsTime() (*time.Time, error)

func (*JobItem) SetExecutionTimeAsTime

func (o *JobItem) SetExecutionTimeAsTime(input time.Time)

type JobOperationPredicate

type JobOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (JobOperationPredicate) Matches

func (p JobOperationPredicate) Matches(input Job) bool

type JobProperties

type JobProperties struct {
	EndTime           *string            `json:"endTime,omitempty"`
	ErrorMessage      *string            `json:"errorMessage,omitempty"`
	Items             *[]JobItem         `json:"items,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	StartTime         *string            `json:"startTime,omitempty"`
}

func (*JobProperties) GetEndTimeAsTime

func (o *JobProperties) GetEndTimeAsTime() (*time.Time, error)

func (*JobProperties) GetStartTimeAsTime

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

func (*JobProperties) SetEndTimeAsTime

func (o *JobProperties) SetEndTimeAsTime(input time.Time)

func (*JobProperties) SetStartTimeAsTime

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

type ListCompleteResult

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

type ListCustomPager

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Orderby *string
	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

type ListOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled   ProvisioningState = "Canceled"
	ProvisioningStateFailed     ProvisioningState = "Failed"
	ProvisioningStateInProgress ProvisioningState = "InProgress"
	ProvisioningStateSucceeded  ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type Status

type Status string
const (
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
	StatusSucceeded  Status = "Succeeded"
)

func (*Status) UnmarshalJSON

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

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

type WorkspaceManagerAssignment

type WorkspaceManagerAssignment struct {
	Etag       *string                               `json:"etag,omitempty"`
	Id         *string                               `json:"id,omitempty"`
	Name       *string                               `json:"name,omitempty"`
	Properties *WorkspaceManagerAssignmentProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                `json:"systemData,omitempty"`
	Type       *string                               `json:"type,omitempty"`
}

type WorkspaceManagerAssignmentId

type WorkspaceManagerAssignmentId struct {
	SubscriptionId                 string
	ResourceGroupName              string
	WorkspaceName                  string
	WorkspaceManagerAssignmentName string
}

WorkspaceManagerAssignmentId is a struct representing the Resource ID for a Workspace Manager Assignment

func NewWorkspaceManagerAssignmentID

func NewWorkspaceManagerAssignmentID(subscriptionId string, resourceGroupName string, workspaceName string, workspaceManagerAssignmentName string) WorkspaceManagerAssignmentId

NewWorkspaceManagerAssignmentID returns a new WorkspaceManagerAssignmentId struct

func ParseWorkspaceManagerAssignmentID

func ParseWorkspaceManagerAssignmentID(input string) (*WorkspaceManagerAssignmentId, error)

ParseWorkspaceManagerAssignmentID parses 'input' into a WorkspaceManagerAssignmentId

func ParseWorkspaceManagerAssignmentIDInsensitively

func ParseWorkspaceManagerAssignmentIDInsensitively(input string) (*WorkspaceManagerAssignmentId, error)

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

func (*WorkspaceManagerAssignmentId) FromParseResult

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

func (WorkspaceManagerAssignmentId) ID

ID returns the formatted Workspace Manager Assignment ID

func (WorkspaceManagerAssignmentId) Segments

Segments returns a slice of Resource ID Segments which comprise this Workspace Manager Assignment ID

func (WorkspaceManagerAssignmentId) String

String returns a human-readable description of this Workspace Manager Assignment ID

type WorkspaceManagerAssignmentJobsCreateOperationResponse

type WorkspaceManagerAssignmentJobsCreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Job
}

type WorkspaceManagerAssignmentJobsDeleteOperationResponse

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

type WorkspaceManagerAssignmentJobsGetOperationResponse

type WorkspaceManagerAssignmentJobsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Job
}

type WorkspaceManagerAssignmentJobsListCompleteResult

type WorkspaceManagerAssignmentJobsListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Job
}

type WorkspaceManagerAssignmentJobsListCustomPager

type WorkspaceManagerAssignmentJobsListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type WorkspaceManagerAssignmentJobsListOperationOptions

type WorkspaceManagerAssignmentJobsListOperationOptions struct {
	Orderby *string
	Top     *int64
}

func DefaultWorkspaceManagerAssignmentJobsListOperationOptions

func DefaultWorkspaceManagerAssignmentJobsListOperationOptions() WorkspaceManagerAssignmentJobsListOperationOptions

func (WorkspaceManagerAssignmentJobsListOperationOptions) ToHeaders

func (WorkspaceManagerAssignmentJobsListOperationOptions) ToOData

func (WorkspaceManagerAssignmentJobsListOperationOptions) ToQuery

type WorkspaceManagerAssignmentJobsListOperationResponse

type WorkspaceManagerAssignmentJobsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Job
}

type WorkspaceManagerAssignmentOperationPredicate

type WorkspaceManagerAssignmentOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (WorkspaceManagerAssignmentOperationPredicate) Matches

type WorkspaceManagerAssignmentProperties

type WorkspaceManagerAssignmentProperties struct {
	Items                    []AssignmentItem   `json:"items"`
	LastJobEndTime           *string            `json:"lastJobEndTime,omitempty"`
	LastJobProvisioningState *ProvisioningState `json:"lastJobProvisioningState,omitempty"`
	TargetResourceName       string             `json:"targetResourceName"`
}

func (*WorkspaceManagerAssignmentProperties) GetLastJobEndTimeAsTime

func (o *WorkspaceManagerAssignmentProperties) GetLastJobEndTimeAsTime() (*time.Time, error)

func (*WorkspaceManagerAssignmentProperties) SetLastJobEndTimeAsTime

func (o *WorkspaceManagerAssignmentProperties) SetLastJobEndTimeAsTime(input time.Time)

type WorkspaceManagerAssignmentsClient

type WorkspaceManagerAssignmentsClient struct {
	Client *resourcemanager.Client
}

func NewWorkspaceManagerAssignmentsClientWithBaseURI

func NewWorkspaceManagerAssignmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkspaceManagerAssignmentsClient, error)

func (WorkspaceManagerAssignmentsClient) CreateOrUpdate

CreateOrUpdate ...

func (WorkspaceManagerAssignmentsClient) Delete

Delete ...

func (WorkspaceManagerAssignmentsClient) Get

Get ...

func (WorkspaceManagerAssignmentsClient) List

List ...

func (WorkspaceManagerAssignmentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (WorkspaceManagerAssignmentsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsCreate

WorkspaceManagerAssignmentJobsCreate ...

func (WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsDelete

func (c WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsDelete(ctx context.Context, id JobId) (result WorkspaceManagerAssignmentJobsDeleteOperationResponse, err error)

WorkspaceManagerAssignmentJobsDelete ...

func (WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsGet

func (c WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsGet(ctx context.Context, id JobId) (result WorkspaceManagerAssignmentJobsGetOperationResponse, err error)

WorkspaceManagerAssignmentJobsGet ...

func (WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsList

WorkspaceManagerAssignmentJobsList ...

func (WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsListComplete

WorkspaceManagerAssignmentJobsListComplete retrieves all the results into a single object

func (WorkspaceManagerAssignmentsClient) WorkspaceManagerAssignmentJobsListCompleteMatchingPredicate

WorkspaceManagerAssignmentJobsListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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