armcustomerlockbox

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 1

README

Azure Customer Lockbox Module for Go

PkgGoDev

The armcustomerlockbox module provides operations for working with Azure Customer Lockbox.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Customer Lockbox module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Customer Lockbox. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Customer Lockbox module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armcustomerlockbox.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armcustomerlockbox.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewGetClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Customer Lockbox label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Approval

type Approval struct {
	// Reason of the decision
	Reason *string

	// Approval decision to the Lockbox request.
	Status *Status
}

Approval - Request content object, in the use of Approve or Deny a Lockbox request.

func (Approval) MarshalJSON added in v0.6.0

func (a Approval) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Approval.

func (*Approval) UnmarshalJSON added in v0.6.0

func (a *Approval) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Approval.

type ClientFactory added in v0.6.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v0.6.0

func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewGetClient added in v0.6.0

func (c *ClientFactory) NewGetClient() *GetClient

NewGetClient creates a new instance of GetClient.

func (*ClientFactory) NewOperationsClient added in v0.6.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPostClient added in v0.6.0

func (c *ClientFactory) NewPostClient() *PostClient

NewPostClient creates a new instance of PostClient.

func (*ClientFactory) NewRequestsClient added in v0.6.0

func (c *ClientFactory) NewRequestsClient() *RequestsClient

NewRequestsClient creates a new instance of RequestsClient.

type ErrorAdditionalInfoInfo

type ErrorAdditionalInfoInfo struct {
	// The current status/state of the request quired.
	CurrentStatus *Status
}

ErrorAdditionalInfoInfo - Additional information about the request that is in error state.

func (ErrorAdditionalInfoInfo) MarshalJSON added in v0.6.0

func (e ErrorAdditionalInfoInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfoInfo.

func (*ErrorAdditionalInfoInfo) UnmarshalJSON added in v0.6.0

func (e *ErrorAdditionalInfoInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfoInfo.

type GetClient

type GetClient struct {
	// contains filtered or unexported fields
}

GetClient contains the methods for the Get group. Don't use this type directly, use NewGetClient() instead.

func NewGetClient

func NewGetClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GetClient, error)

NewGetClient creates a new instance of GetClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GetClient) TenantOptedIn

func (client *GetClient) TenantOptedIn(ctx context.Context, tenantID string, options *GetClientTenantOptedInOptions) (GetClientTenantOptedInResponse, error)

TenantOptedIn - Get Customer Lockbox request If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-02-28-preview

  • tenantID - The Azure tenant ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • options - GetClientTenantOptedInOptions contains the optional parameters for the GetClient.TenantOptedIn method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/TenantOptedIn.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGetClient().TenantOptedIn(ctx, "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TenantOptInResponse = armcustomerlockbox.TenantOptInResponse{
	// 	IsOptedIn: to.Ptr(true),
	// }
}
Output:

type GetClientTenantOptedInOptions added in v0.2.0

type GetClientTenantOptedInOptions struct {
}

GetClientTenantOptedInOptions contains the optional parameters for the GetClient.TenantOptedIn method.

type GetClientTenantOptedInResponse added in v0.2.0

type GetClientTenantOptedInResponse struct {
	// TenantOptIn Response object
	TenantOptInResponse
}

GetClientTenantOptedInResponse contains the response from method GetClient.TenantOptedIn.

type LockboxRequestResponse

type LockboxRequestResponse struct {
	// The properties that are associated with a lockbox request.
	Properties *LockboxRequestResponseProperties

	// READ-ONLY; The Arm resource id of the Lockbox request.
	ID *string

	// READ-ONLY; The name of the Lockbox request.
	Name *string

	// READ-ONLY; The type of the Lockbox request.
	Type *string
}

LockboxRequestResponse - A Lockbox request response object, containing all information associated with the request.

func (LockboxRequestResponse) MarshalJSON added in v0.6.0

func (l LockboxRequestResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LockboxRequestResponse.

func (*LockboxRequestResponse) UnmarshalJSON added in v0.6.0

func (l *LockboxRequestResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LockboxRequestResponse.

type LockboxRequestResponseProperties

type LockboxRequestResponseProperties struct {
	// The status of the request.
	Status *Status

	// READ-ONLY; Access level for requested resource
	AccessLevel *string

	// READ-ONLY; The creation time of the request.
	CreatedDateTime *time.Time

	// READ-ONLY; The duration of the request in hours.
	Duration *string

	// READ-ONLY; The expiration time of the request.
	ExpirationDateTime *time.Time

	// READ-ONLY; The justification of the requestor.
	Justification *string

	// READ-ONLY; The Lockbox request ID.
	RequestID *string

	// READ-ONLY; A list of resource IDs associated with the Lockbox request separated by ','.
	ResourceIDs *string

	// READ-ONLY; The resource type of the requested resources.
	ResourceType *string

	// READ-ONLY; The subscription ID.
	SubscriptionID *string

	// READ-ONLY; The url of the support case.
	SupportCaseURL *string

	// READ-ONLY; The id of the support request associated.
	SupportRequest *string

	// READ-ONLY; The support case system that was used to initiate the request.
	Workitemsource *string
}

LockboxRequestResponseProperties - The properties that are associated with a lockbox request.

func (LockboxRequestResponseProperties) MarshalJSON

func (l LockboxRequestResponseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LockboxRequestResponseProperties.

func (*LockboxRequestResponseProperties) UnmarshalJSON

func (l *LockboxRequestResponseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LockboxRequestResponseProperties.

type Operation

type Operation struct {
	// READ-ONLY; Contains the localized display information for this particular operation / action.
	Display *OperationDisplay

	// READ-ONLY; Gets or sets a value indicating whether it is a data plane action
	IsDataAction *string

	// READ-ONLY; Gets or sets action name
	Name *string

	// READ-ONLY; Gets or sets origin
	Origin *string

	// READ-ONLY; Gets or sets properties
	Properties *string
}

Operation result model for ARM RP

func (Operation) MarshalJSON added in v0.6.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v0.6.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The localized friendly description for the operation.
	Description *string

	// READ-ONLY; The localized friendly name for the operation.
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name.
	Provider *string

	// READ-ONLY; The localized friendly form of the resource type related to this action/operation.
	Resource *string
}

OperationDisplay - Contains the localized display information for this particular operation / action.

func (OperationDisplay) MarshalJSON added in v0.6.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.6.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string

	// READ-ONLY; List of Customer Lockbox operations supported by the Microsoft.StreamAnalytics resource provider.
	Value []*Operation
}

OperationListResult - Result of the request to list Customer Lockbox operations. It contains a list of operations.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v0.6.0

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Lists all the available REST API operations.

Generated from API version 2018-02-28-preview

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armcustomerlockbox.OperationListResult{
		// 	Value: []*armcustomerlockbox.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/register/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Register Provider Microsoft.CustomerLockbox"),
		// 				Operation: to.Ptr("Register Provider Microsoft.CustomerLockboxx"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Microsoft Customer Lockbox"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/operations/read"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Read Lockbox Operations"),
		// 				Operation: to.Ptr("Read Lockbox Operations"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Lockbox Operations"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/read"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Read Lockbox Request"),
		// 				Operation: to.Ptr("Read Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/activitylog/CreateLockboxRequest/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Create Lockbox Request"),
		// 				Operation: to.Ptr("Create Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/activitylog/ApproveLockboxRequest/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Approve Lockbox Request"),
		// 				Operation: to.Ptr("Approve Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/activitylog/DenyLockboxRequest/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Deny Lockbox Request"),
		// 				Operation: to.Ptr("Deny Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/activitylog/ExpireLockboxRequest/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Expire Lockbox Request"),
		// 				Operation: to.Ptr("Expire Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/activitylog/CancelLockboxRequest/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("Cancel Lockbox Request"),
		// 				Operation: to.Ptr("Cancel Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/activitylog/AutoApproveLockboxRequest/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("AutoApprove Lockbox Request"),
		// 				Operation: to.Ptr("AutoApprove Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.CustomerLockbox/requests/activitylog/AutoDenyLockboxRequest/action"),
		// 			Display: &armcustomerlockbox.OperationDisplay{
		// 				Description: to.Ptr("AutoDeny Lockbox Request"),
		// 				Operation: to.Ptr("AutoDeny Lockbox Request"),
		// 				Provider: to.Ptr("Microsoft Customer Lockbox"),
		// 				Resource: to.Ptr("Customer Lockbox Request"),
		// 			},
		// 			IsDataAction: to.Ptr("false"),
		// 			Origin: to.Ptr("user,system"),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// Result of the request to list Customer Lockbox operations. It contains a list of operations.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PostClient

type PostClient struct {
	// contains filtered or unexported fields
}

PostClient contains the methods for the Post group. Don't use this type directly, use NewPostClient() instead.

func NewPostClient

func NewPostClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PostClient, error)

NewPostClient creates a new instance of PostClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PostClient) DisableLockbox

DisableLockbox - Disable Tenant for Lockbox If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-02-28-preview

  • options - PostClientDisableLockboxOptions contains the optional parameters for the PostClient.DisableLockbox method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/DisableLockbox.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewPostClient().DisableLockbox(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*PostClient) EnableLockbox

EnableLockbox - Enable Tenant for Lockbox If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-02-28-preview

  • options - PostClientEnableLockboxOptions contains the optional parameters for the PostClient.EnableLockbox method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/EnableLockbox.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewPostClient().EnableLockbox(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type PostClientDisableLockboxOptions added in v0.2.0

type PostClientDisableLockboxOptions struct {
}

PostClientDisableLockboxOptions contains the optional parameters for the PostClient.DisableLockbox method.

type PostClientDisableLockboxResponse added in v0.2.0

type PostClientDisableLockboxResponse struct {
}

PostClientDisableLockboxResponse contains the response from method PostClient.DisableLockbox.

type PostClientEnableLockboxOptions added in v0.2.0

type PostClientEnableLockboxOptions struct {
}

PostClientEnableLockboxOptions contains the optional parameters for the PostClient.EnableLockbox method.

type PostClientEnableLockboxResponse added in v0.2.0

type PostClientEnableLockboxResponse struct {
}

PostClientEnableLockboxResponse contains the response from method PostClient.EnableLockbox.

type RequestListResult

type RequestListResult struct {
	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string

	// READ-ONLY; A list of Lockbox requests. Populated by a 'List' operation.
	Value []*LockboxRequestResponse
}

RequestListResult - Object containing a list of streaming jobs.

func (RequestListResult) MarshalJSON

func (r RequestListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestListResult.

func (*RequestListResult) UnmarshalJSON added in v0.6.0

func (r *RequestListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestListResult.

type RequestsClient

type RequestsClient struct {
	// contains filtered or unexported fields
}

RequestsClient contains the methods for the Requests group. Don't use this type directly, use NewRequestsClient() instead.

func NewRequestsClient

func NewRequestsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RequestsClient, error)

NewRequestsClient creates a new instance of RequestsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RequestsClient) Get

func (client *RequestsClient) Get(ctx context.Context, requestID string, subscriptionID string, options *RequestsClientGetOptions) (RequestsClientGetResponse, error)

Get - Get Customer Lockbox request If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-02-28-preview

  • requestID - The Lockbox request ID.
  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • options - RequestsClientGetOptions contains the optional parameters for the RequestsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/Requests_Get_InSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRequestsClient().Get(ctx, "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.LockboxRequestResponse = armcustomerlockbox.LockboxRequestResponse{
	// 	Name: to.Ptr("LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
	// 	Type: to.Ptr("requests"),
	// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
	// 	Properties: &armcustomerlockbox.LockboxRequestResponseProperties{
	// 		CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-17T23:15:42.031Z"); return t}()),
	// 		Duration: to.Ptr("8"),
	// 		ExpirationDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-21T23:15:42.031Z"); return t}()),
	// 		Justification: to.Ptr("Microsoft Support Team is requesting access to your resource temporarily for troubleshooting."),
	// 		RequestID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
	// 		ResourceIDs: to.Ptr("SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMORG/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO"),
	// 		ResourceType: to.Ptr("VMSS"),
	// 		Status: to.Ptr(armcustomerlockbox.StatusExpired),
	// 		SubscriptionID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
	// 		SupportCaseURL: to.Ptr("https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/12345"),
	// 		SupportRequest: to.Ptr("12345"),
	// 		Workitemsource: to.Ptr("Other"),
	// 	},
	// }
}
Output:

func (*RequestsClient) NewListPager added in v0.4.0

func (client *RequestsClient) NewListPager(subscriptionID string, options *RequestsClientListOptions) *runtime.Pager[RequestsClientListResponse]

NewListPager - Lists all of the Lockbox requests in the given subscription.

Generated from API version 2018-02-28-preview

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • options - RequestsClientListOptions contains the optional parameters for the RequestsClient.NewListPager method.
Example (ListLockboxRequestsInASubscriptionWithFilterByRequestStatusEgFilterPropertiesStatusEqPending)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/Requests_List_FilterByStatus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRequestsClient().NewListPager("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", &armcustomerlockbox.RequestsClientListOptions{Filter: to.Ptr("properties/status eq 'Expired'")})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RequestListResult = armcustomerlockbox.RequestListResult{
		// 	Value: []*armcustomerlockbox.LockboxRequestResponse{
		// 		{
		// 			Name: to.Ptr("LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Type: to.Ptr("requests"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Properties: &armcustomerlockbox.LockboxRequestResponseProperties{
		// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-17T23:15:42.031Z"); return t}()),
		// 				Duration: to.Ptr("8"),
		// 				ExpirationDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-21T23:15:42.031Z"); return t}()),
		// 				Justification: to.Ptr("Microsoft Support Team is requesting access to your resource temporarily for troubleshooting."),
		// 				RequestID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceIDs: to.Ptr("SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMORG/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO"),
		// 				ResourceType: to.Ptr("VMSS"),
		// 				Status: to.Ptr(armcustomerlockbox.StatusExpired),
		// 				SubscriptionID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				SupportCaseURL: to.Ptr("https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/12345"),
		// 				SupportRequest: to.Ptr("12345"),
		// 				Workitemsource: to.Ptr("Other"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Type: to.Ptr("requests"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Properties: &armcustomerlockbox.LockboxRequestResponseProperties{
		// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-19T03:12:51.267Z"); return t}()),
		// 				Duration: to.Ptr("8"),
		// 				ExpirationDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-23T03:12:51.267Z"); return t}()),
		// 				Justification: to.Ptr("Microsoft Support Team is requesting access to your resource temporarily for troubleshooting."),
		// 				RequestID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceIDs: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceType: to.Ptr("Subscription"),
		// 				Status: to.Ptr(armcustomerlockbox.StatusExpired),
		// 				SubscriptionID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				SupportCaseURL: to.Ptr("https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/120101324000234"),
		// 				SupportRequest: to.Ptr("120101324000234"),
		// 				Workitemsource: to.Ptr("SupportRequest"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (ListLockboxRequestsWithNoFilters)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/Requests_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRequestsClient().NewListPager("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", &armcustomerlockbox.RequestsClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RequestListResult = armcustomerlockbox.RequestListResult{
		// 	Value: []*armcustomerlockbox.LockboxRequestResponse{
		// 		{
		// 			Name: to.Ptr("LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Type: to.Ptr("requests"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Properties: &armcustomerlockbox.LockboxRequestResponseProperties{
		// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-17T23:15:42.031Z"); return t}()),
		// 				Duration: to.Ptr("8"),
		// 				ExpirationDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-21T23:15:42.031Z"); return t}()),
		// 				Justification: to.Ptr("Microsoft Support Team is requesting access to your resource temporarily for troubleshooting."),
		// 				RequestID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceIDs: to.Ptr("SUBSCRIPTIONS/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/RESOURCEGROUPS/DEMORG/PROVIDERS/MICROSOFT.COMPUTE/VIRTUALMACHINES/DEMO"),
		// 				ResourceType: to.Ptr("VMSS"),
		// 				Status: to.Ptr(armcustomerlockbox.StatusExpired),
		// 				SubscriptionID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				SupportCaseURL: to.Ptr("https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/12345"),
		// 				SupportRequest: to.Ptr("12345"),
		// 				Workitemsource: to.Ptr("Other"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Type: to.Ptr("requests"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Properties: &armcustomerlockbox.LockboxRequestResponseProperties{
		// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-19T03:12:51.267Z"); return t}()),
		// 				Duration: to.Ptr("8"),
		// 				ExpirationDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-23T03:12:51.267Z"); return t}()),
		// 				Justification: to.Ptr("Microsoft Support Team is requesting access to your resource temporarily for troubleshooting."),
		// 				RequestID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceIDs: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceType: to.Ptr("Subscription"),
		// 				Status: to.Ptr(armcustomerlockbox.StatusExpired),
		// 				SubscriptionID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				SupportCaseURL: to.Ptr("https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/120101324000234"),
		// 				SupportRequest: to.Ptr("120101324000234"),
		// 				Workitemsource: to.Ptr("SupportRequest"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("LockboxRequest_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Type: to.Ptr("requests"),
		// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CustomerLockbox/requests/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 			Properties: &armcustomerlockbox.LockboxRequestResponseProperties{
		// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T15:08:17.590Z"); return t}()),
		// 				Duration: to.Ptr("Support request lifetime"),
		// 				ExpirationDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-28T15:08:17.590Z"); return t}()),
		// 				Justification: to.Ptr("Microsoft Support Team is requesting access to your resource temporarily for troubleshooting."),
		// 				RequestID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceIDs: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				ResourceType: to.Ptr("Subscription"),
		// 				Status: to.Ptr(armcustomerlockbox.StatusDenied),
		// 				SubscriptionID: to.Ptr("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
		// 				SupportCaseURL: to.Ptr("https://portal.azure.com/#resource/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/microsoft.support/supporttickets/120101324000234"),
		// 				SupportRequest: to.Ptr("120101324000234"),
		// 				Workitemsource: to.Ptr("SupportRequest"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*RequestsClient) UpdateStatus

func (client *RequestsClient) UpdateStatus(ctx context.Context, subscriptionID string, requestID string, approval Approval, options *RequestsClientUpdateStatusOptions) (RequestsClientUpdateStatusResponse, error)

UpdateStatus - Update Customer Lockbox request approval status API If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-02-28-preview

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • requestID - The Lockbox request ID.
  • approval - The approval object to update request status.
  • options - RequestsClientUpdateStatusOptions contains the optional parameters for the RequestsClient.UpdateStatus method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/customerlockbox/resource-manager/Microsoft.CustomerLockbox/preview/2018-02-28-preview/examples/Requests_UpdateStatus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/customerlockbox/armcustomerlockbox"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcustomerlockbox.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRequestsClient().UpdateStatus(ctx, "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", armcustomerlockbox.Approval{
		Reason: to.Ptr("Customer approve"),
		Status: to.Ptr(armcustomerlockbox.StatusApprove),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Approval = armcustomerlockbox.Approval{
	// 	Reason: to.Ptr("Customer approve"),
	// 	Status: to.Ptr(armcustomerlockbox.StatusApprove),
	// }
}
Output:

type RequestsClientGetOptions added in v0.2.0

type RequestsClientGetOptions struct {
}

RequestsClientGetOptions contains the optional parameters for the RequestsClient.Get method.

type RequestsClientGetResponse added in v0.2.0

type RequestsClientGetResponse struct {
	// A Lockbox request response object, containing all information associated with the request.
	LockboxRequestResponse
}

RequestsClientGetResponse contains the response from method RequestsClient.Get.

type RequestsClientListOptions added in v0.2.0

type RequestsClientListOptions struct {
	// The $filter OData query parameter. Only filter by request status is supported, e.g $filter=properties/status eq 'Pending'
	Filter *string
}

RequestsClientListOptions contains the optional parameters for the RequestsClient.NewListPager method.

type RequestsClientListResponse added in v0.2.0

type RequestsClientListResponse struct {
	// Object containing a list of streaming jobs.
	RequestListResult
}

RequestsClientListResponse contains the response from method RequestsClient.NewListPager.

type RequestsClientUpdateStatusOptions added in v0.2.0

type RequestsClientUpdateStatusOptions struct {
}

RequestsClientUpdateStatusOptions contains the optional parameters for the RequestsClient.UpdateStatus method.

type RequestsClientUpdateStatusResponse added in v0.2.0

type RequestsClientUpdateStatusResponse struct {
	// Request content object, in the use of Approve or Deny a Lockbox request.
	Approval
}

RequestsClientUpdateStatusResponse contains the response from method RequestsClient.UpdateStatus.

type Status

type Status string

Status - The status of the request.

const (
	StatusApprove      Status = "Approve"
	StatusApproved     Status = "Approved"
	StatusApproving    Status = "Approving"
	StatusCompleted    Status = "Completed"
	StatusCompleting   Status = "Completing"
	StatusDenied       Status = "Denied"
	StatusDeny         Status = "Deny"
	StatusDenying      Status = "Denying"
	StatusError        Status = "Error"
	StatusExpired      Status = "Expired"
	StatusInitializing Status = "Initializing"
	StatusPending      Status = "Pending"
	StatusRevoked      Status = "Revoked"
	StatusRevoking     Status = "Revoking"
	StatusUnknown      Status = "Unknown"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type TenantOptInResponse

type TenantOptInResponse struct {
	// READ-ONLY; True if tenant is opted in, false otherwise
	IsOptedIn *bool
}

TenantOptInResponse - TenantOptIn Response object

func (TenantOptInResponse) MarshalJSON added in v0.6.0

func (t TenantOptInResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TenantOptInResponse.

func (*TenantOptInResponse) UnmarshalJSON added in v0.6.0

func (t *TenantOptInResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TenantOptInResponse.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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