datastore

package
v0.20230127.1024009 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2022-05-01/datastore Documentation

The datastore SDK allows for interaction with the Azure Resource Manager Service machinelearningservices (API Version 2022-05-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/machinelearningservices/2022-05-01/datastore"

Client Initialization

client := datastore.NewDatastoreClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatastoreClient.CreateOrUpdate

ctx := context.TODO()
id := datastore.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "dataStoreValue")

payload := datastore.DatastoreResource{
	// ...
}


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

Example Usage: DatastoreClient.Delete

ctx := context.TODO()
id := datastore.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "dataStoreValue")

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

ctx := context.TODO()
id := datastore.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "dataStoreValue")

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

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

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

Example Usage: DatastoreClient.ListSecrets

ctx := context.TODO()
id := datastore.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "dataStoreValue")

read, err := client.ListSecrets(ctx, id)
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 PossibleValuesForCredentialsType

func PossibleValuesForCredentialsType() []string

func PossibleValuesForDatastoreType

func PossibleValuesForDatastoreType() []string

func PossibleValuesForSecretsType

func PossibleValuesForSecretsType() []string

func PossibleValuesForServiceDataAccessAuthIdentity

func PossibleValuesForServiceDataAccessAuthIdentity() []string

func ValidateDataStoreID

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

ValidateDataStoreID checks that 'input' can be parsed as a Data Store ID

func ValidateWorkspaceID

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

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

Types

type AccountKeyDatastoreCredentials

type AccountKeyDatastoreCredentials struct {
	Secrets DatastoreSecrets `json:"secrets"`
}

func (AccountKeyDatastoreCredentials) MarshalJSON

func (s AccountKeyDatastoreCredentials) MarshalJSON() ([]byte, error)

func (*AccountKeyDatastoreCredentials) UnmarshalJSON

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

type AccountKeyDatastoreSecrets

type AccountKeyDatastoreSecrets struct {
	Key *string `json:"key,omitempty"`
}

func (AccountKeyDatastoreSecrets) MarshalJSON

func (s AccountKeyDatastoreSecrets) MarshalJSON() ([]byte, error)

type AzureBlobDatastore

type AzureBlobDatastore struct {
	AccountName                   *string                        `json:"accountName,omitempty"`
	ContainerName                 *string                        `json:"containerName,omitempty"`
	Endpoint                      *string                        `json:"endpoint,omitempty"`
	Protocol                      *string                        `json:"protocol,omitempty"`
	ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"`

	// Fields inherited from Datastore
	Credentials DatastoreCredentials `json:"credentials"`
	Description *string              `json:"description,omitempty"`
	IsDefault   *bool                `json:"isDefault,omitempty"`
	Properties  *map[string]string   `json:"properties,omitempty"`
	Tags        *map[string]string   `json:"tags,omitempty"`
}

func (AzureBlobDatastore) MarshalJSON

func (s AzureBlobDatastore) MarshalJSON() ([]byte, error)

func (*AzureBlobDatastore) UnmarshalJSON added in v0.20220704.1074157

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

type AzureDataLakeGen1Datastore

type AzureDataLakeGen1Datastore struct {
	ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"`
	StoreName                     string                         `json:"storeName"`

	// Fields inherited from Datastore
	Credentials DatastoreCredentials `json:"credentials"`
	Description *string              `json:"description,omitempty"`
	IsDefault   *bool                `json:"isDefault,omitempty"`
	Properties  *map[string]string   `json:"properties,omitempty"`
	Tags        *map[string]string   `json:"tags,omitempty"`
}

func (AzureDataLakeGen1Datastore) MarshalJSON

func (s AzureDataLakeGen1Datastore) MarshalJSON() ([]byte, error)

func (*AzureDataLakeGen1Datastore) UnmarshalJSON added in v0.20220704.1074157

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

type AzureDataLakeGen2Datastore

type AzureDataLakeGen2Datastore struct {
	AccountName                   string                         `json:"accountName"`
	Endpoint                      *string                        `json:"endpoint,omitempty"`
	Filesystem                    string                         `json:"filesystem"`
	Protocol                      *string                        `json:"protocol,omitempty"`
	ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"`

	// Fields inherited from Datastore
	Credentials DatastoreCredentials `json:"credentials"`
	Description *string              `json:"description,omitempty"`
	IsDefault   *bool                `json:"isDefault,omitempty"`
	Properties  *map[string]string   `json:"properties,omitempty"`
	Tags        *map[string]string   `json:"tags,omitempty"`
}

func (AzureDataLakeGen2Datastore) MarshalJSON

func (s AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error)

func (*AzureDataLakeGen2Datastore) UnmarshalJSON added in v0.20220704.1074157

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

type AzureFileDatastore

type AzureFileDatastore struct {
	AccountName                   string                         `json:"accountName"`
	Endpoint                      *string                        `json:"endpoint,omitempty"`
	FileShareName                 string                         `json:"fileShareName"`
	Protocol                      *string                        `json:"protocol,omitempty"`
	ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"`

	// Fields inherited from Datastore
	Credentials DatastoreCredentials `json:"credentials"`
	Description *string              `json:"description,omitempty"`
	IsDefault   *bool                `json:"isDefault,omitempty"`
	Properties  *map[string]string   `json:"properties,omitempty"`
	Tags        *map[string]string   `json:"tags,omitempty"`
}

func (AzureFileDatastore) MarshalJSON

func (s AzureFileDatastore) MarshalJSON() ([]byte, error)

func (*AzureFileDatastore) UnmarshalJSON added in v0.20220704.1074157

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

type CertificateDatastoreCredentials

type CertificateDatastoreCredentials struct {
	AuthorityUrl *string          `json:"authorityUrl,omitempty"`
	ClientId     string           `json:"clientId"`
	ResourceUrl  *string          `json:"resourceUrl,omitempty"`
	Secrets      DatastoreSecrets `json:"secrets"`
	TenantId     string           `json:"tenantId"`
	Thumbprint   string           `json:"thumbprint"`
}

func (CertificateDatastoreCredentials) MarshalJSON

func (s CertificateDatastoreCredentials) MarshalJSON() ([]byte, error)

func (*CertificateDatastoreCredentials) UnmarshalJSON

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

type CertificateDatastoreSecrets

type CertificateDatastoreSecrets struct {
	Certificate *string `json:"certificate,omitempty"`
}

func (CertificateDatastoreSecrets) MarshalJSON

func (s CertificateDatastoreSecrets) MarshalJSON() ([]byte, error)

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	SkipValidation *bool
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatastoreResource
}

type CredentialsType

type CredentialsType string
const (
	CredentialsTypeAccountKey       CredentialsType = "AccountKey"
	CredentialsTypeCertificate      CredentialsType = "Certificate"
	CredentialsTypeNone             CredentialsType = "None"
	CredentialsTypeSas              CredentialsType = "Sas"
	CredentialsTypeServicePrincipal CredentialsType = "ServicePrincipal"
)

type DataStoreId

type DataStoreId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	DataStoreName     string
}

DataStoreId is a struct representing the Resource ID for a Data Store

func NewDataStoreID

func NewDataStoreID(subscriptionId string, resourceGroupName string, workspaceName string, dataStoreName string) DataStoreId

NewDataStoreID returns a new DataStoreId struct

func ParseDataStoreID

func ParseDataStoreID(input string) (*DataStoreId, error)

ParseDataStoreID parses 'input' into a DataStoreId

func ParseDataStoreIDInsensitively

func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error)

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

func (DataStoreId) ID

func (id DataStoreId) ID() string

ID returns the formatted Data Store ID

func (DataStoreId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Data Store ID

func (DataStoreId) String

func (id DataStoreId) String() string

String returns a human-readable description of this Data Store ID

type Datastore

type Datastore interface {
}

type DatastoreClient

type DatastoreClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewDatastoreClientWithBaseURI

func NewDatastoreClientWithBaseURI(endpoint string) DatastoreClient

func (DatastoreClient) CreateOrUpdate

CreateOrUpdate ...

func (DatastoreClient) Delete

func (c DatastoreClient) Delete(ctx context.Context, id DataStoreId) (result DeleteOperationResponse, err error)

Delete ...

func (DatastoreClient) Get

Get ...

func (DatastoreClient) List

List ...

func (DatastoreClient) ListComplete

ListComplete retrieves all of the results into a single object

func (DatastoreClient) ListCompleteMatchingPredicate

func (c DatastoreClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options ListOperationOptions, predicate DatastoreResourceOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (DatastoreClient) ListSecrets

func (c DatastoreClient) ListSecrets(ctx context.Context, id DataStoreId) (result ListSecretsOperationResponse, err error)

ListSecrets ...

type DatastoreCredentials

type DatastoreCredentials interface {
}

type DatastoreResource

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

func (*DatastoreResource) UnmarshalJSON

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

type DatastoreResourceOperationPredicate

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

func (DatastoreResourceOperationPredicate) Matches

type DatastoreSecrets

type DatastoreSecrets interface {
}

type DatastoreType

type DatastoreType string
const (
	DatastoreTypeAzureBlob           DatastoreType = "AzureBlob"
	DatastoreTypeAzureDataLakeGenOne DatastoreType = "AzureDataLakeGen1"
	DatastoreTypeAzureDataLakeGenTwo DatastoreType = "AzureDataLakeGen2"
	DatastoreTypeAzureFile           DatastoreType = "AzureFile"
)

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatastoreResource
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []DatastoreResource
}

type ListOperationOptions

type ListOperationOptions struct {
	Count      *int64
	IsDefault  *bool
	Names      *[]string
	OrderBy    *string
	OrderByAsc *bool
	SearchText *string
	Skip       *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DatastoreResource
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type ListSecretsOperationResponse

type ListSecretsOperationResponse struct {
	HttpResponse *http.Response
	Model        *DatastoreSecrets
}

type NoneDatastoreCredentials

type NoneDatastoreCredentials struct {
}

func (NoneDatastoreCredentials) MarshalJSON

func (s NoneDatastoreCredentials) MarshalJSON() ([]byte, error)

type SasDatastoreCredentials

type SasDatastoreCredentials struct {
	Secrets DatastoreSecrets `json:"secrets"`
}

func (SasDatastoreCredentials) MarshalJSON

func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error)

func (*SasDatastoreCredentials) UnmarshalJSON

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

type SasDatastoreSecrets

type SasDatastoreSecrets struct {
	SasToken *string `json:"sasToken,omitempty"`
}

func (SasDatastoreSecrets) MarshalJSON

func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error)

type SecretsType

type SecretsType string
const (
	SecretsTypeAccountKey       SecretsType = "AccountKey"
	SecretsTypeCertificate      SecretsType = "Certificate"
	SecretsTypeSas              SecretsType = "Sas"
	SecretsTypeServicePrincipal SecretsType = "ServicePrincipal"
)

type ServiceDataAccessAuthIdentity

type ServiceDataAccessAuthIdentity string
const (
	ServiceDataAccessAuthIdentityNone                            ServiceDataAccessAuthIdentity = "None"
	ServiceDataAccessAuthIdentityWorkspaceSystemAssignedIdentity ServiceDataAccessAuthIdentity = "WorkspaceSystemAssignedIdentity"
	ServiceDataAccessAuthIdentityWorkspaceUserAssignedIdentity   ServiceDataAccessAuthIdentity = "WorkspaceUserAssignedIdentity"
)

type ServicePrincipalDatastoreCredentials

type ServicePrincipalDatastoreCredentials struct {
	AuthorityUrl *string          `json:"authorityUrl,omitempty"`
	ClientId     string           `json:"clientId"`
	ResourceUrl  *string          `json:"resourceUrl,omitempty"`
	Secrets      DatastoreSecrets `json:"secrets"`
	TenantId     string           `json:"tenantId"`
}

func (ServicePrincipalDatastoreCredentials) MarshalJSON

func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error)

func (*ServicePrincipalDatastoreCredentials) UnmarshalJSON

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

type ServicePrincipalDatastoreSecrets

type ServicePrincipalDatastoreSecrets struct {
	ClientSecret *string `json:"clientSecret,omitempty"`
}

func (ServicePrincipalDatastoreSecrets) MarshalJSON

func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]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) 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

Jump to

Keyboard shortcuts

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