datastore

package
v0.20230901.1170029 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2023-04-01/datastore Documentation

The datastore SDK allows for interaction with the Azure Resource Manager Service machinelearningservices (API Version 2023-04-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/2023-04-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 AccountKeyDatastoreSecrets `json:"secrets"`
}

func (AccountKeyDatastoreCredentials) MarshalJSON

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

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

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

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

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      CertificateDatastoreSecrets `json:"secrets"`
	TenantId     string                      `json:"tenantId"`
	Thumbprint   string                      `json:"thumbprint"`
}

func (CertificateDatastoreCredentials) MarshalJSON

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

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230713.1092427

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230713.1092427

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230713.1092427

type CreateOrUpdateOperationResponse

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

type CredentialsType

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

func (*CredentialsType) UnmarshalJSON added in v0.20230713.1092427

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

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 *resourcemanager.Client
}

func NewDatastoreClientWithBaseURI

func NewDatastoreClientWithBaseURI(sdkApi sdkEnv.Api) (*DatastoreClient, error)

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 the results into a single object

func (DatastoreClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies 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"
)

func (*DatastoreType) UnmarshalJSON added in v0.20230713.1092427

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

type DeleteOperationResponse

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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

func (ListOperationOptions) ToHeaders added in v0.20230713.1092427

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

func (ListOperationOptions) ToOData added in v0.20230713.1092427

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

func (ListOperationOptions) ToQuery added in v0.20230713.1092427

type ListOperationResponse

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

type ListSecretsOperationResponse

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

type NoneDatastoreCredentials

type NoneDatastoreCredentials struct {
}

func (NoneDatastoreCredentials) MarshalJSON

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

type RawDatastoreCredentialsImpl added in v0.20230807.1063129

type RawDatastoreCredentialsImpl struct {
	Type   string
	Values map[string]interface{}
}

RawModeOfTransitImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type RawDatastoreImpl added in v0.20230807.1063129

type RawDatastoreImpl struct {
	Type   string
	Values map[string]interface{}
}

RawModeOfTransitImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type RawDatastoreSecretsImpl added in v0.20230807.1063129

type RawDatastoreSecretsImpl struct {
	Type   string
	Values map[string]interface{}
}

RawModeOfTransitImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type SasDatastoreCredentials

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

func (SasDatastoreCredentials) MarshalJSON

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

func (*SecretsType) UnmarshalJSON added in v0.20230713.1092427

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

type ServiceDataAccessAuthIdentity

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

func (*ServiceDataAccessAuthIdentity) UnmarshalJSON added in v0.20230713.1092427

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

type ServicePrincipalDatastoreCredentials

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

func (ServicePrincipalDatastoreCredentials) MarshalJSON

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