armdatalakestore

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 16 Imported by: 3

README

Azure Data Lake Storage Module for Go

PkgGoDev

The armdatalakestore module provides operations for working with Azure Data Lake Storage.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Data Lake Storage module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Data Lake Storage. 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.

Clients

Azure Data Lake Storage modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armdatalakestore.NewLocationsClient(<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,
    },
}
client, err := armdatalakestore.NewLocationsClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Data Lake Storage 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 Account added in v0.3.0

type Account struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The Key Vault encryption identity, if any.
	Identity *EncryptionIdentity `json:"identity,omitempty" azure:"ro"`

	// READ-ONLY; The resource location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The Data Lake Store account properties.
	Properties *AccountProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The resource tags.
	Tags map[string]*string `json:"tags,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

Account - Data Lake Store account information.

func (Account) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type Account.

type AccountBasic added in v0.3.0

type AccountBasic struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The basic Data Lake Store account properties.
	Properties *AccountPropertiesBasic `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The resource tags.
	Tags map[string]*string `json:"tags,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

AccountBasic - Basic Data Lake Store account information, returned on list calls.

func (AccountBasic) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AccountBasic.

type AccountListResult added in v0.3.0

type AccountListResult struct {
	// READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; The results of the list operation.
	Value []*AccountBasic `json:"value,omitempty" azure:"ro"`
}

AccountListResult - Data Lake Store account list information response.

func (AccountListResult) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AccountListResult.

type AccountProperties added in v0.3.0

type AccountProperties struct {
	// READ-ONLY; The unique identifier associated with this Data Lake Store account.
	AccountID *string `json:"accountId,omitempty" azure:"ro"`

	// READ-ONLY; The account creation time.
	CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"`

	// READ-ONLY; The commitment tier in use for the current month.
	CurrentTier *TierType `json:"currentTier,omitempty" azure:"ro"`

	// READ-ONLY; The default owner group for all new folders and files created in the Data Lake Store account.
	DefaultGroup *string `json:"defaultGroup,omitempty" azure:"ro"`

	// READ-ONLY; The Key Vault encryption configuration.
	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty" azure:"ro"`

	// READ-ONLY; The current state of encryption provisioning for this Data Lake Store account.
	EncryptionProvisioningState *EncryptionProvisioningState `json:"encryptionProvisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The current state of encryption for this Data Lake Store account.
	EncryptionState *EncryptionState `json:"encryptionState,omitempty" azure:"ro"`

	// READ-ONLY; The full CName endpoint for this account.
	Endpoint *string `json:"endpoint,omitempty" azure:"ro"`

	// READ-ONLY; The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall
	// is disabled, this is not enforced.
	FirewallAllowAzureIPs *FirewallAllowAzureIPsState `json:"firewallAllowAzureIps,omitempty" azure:"ro"`

	// READ-ONLY; The list of firewall rules associated with this Data Lake Store account.
	FirewallRules []*FirewallRule `json:"firewallRules,omitempty" azure:"ro"`

	// READ-ONLY; The current state of the IP address firewall for this Data Lake Store account.
	FirewallState *FirewallState `json:"firewallState,omitempty" azure:"ro"`

	// READ-ONLY; The account last modified time.
	LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"`

	// READ-ONLY; The commitment tier to use for next month.
	NewTier *TierType `json:"newTier,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning status of the Data Lake Store account.
	ProvisioningState *DataLakeStoreAccountStatus `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The state of the Data Lake Store account.
	State *DataLakeStoreAccountState `json:"state,omitempty" azure:"ro"`

	// READ-ONLY; The current state of the trusted identity provider feature for this Data Lake Store account.
	TrustedIDProviderState *TrustedIDProviderState `json:"trustedIdProviderState,omitempty" azure:"ro"`

	// READ-ONLY; The list of trusted identity providers associated with this Data Lake Store account.
	TrustedIDProviders []*TrustedIDProvider `json:"trustedIdProviders,omitempty" azure:"ro"`

	// READ-ONLY; The list of virtual network rules associated with this Data Lake Store account.
	VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty" azure:"ro"`
}

AccountProperties - Data Lake Store account properties information.

func (AccountProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AccountProperties.

func (*AccountProperties) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties.

type AccountPropertiesBasic added in v0.3.0

type AccountPropertiesBasic struct {
	// READ-ONLY; The unique identifier associated with this Data Lake Store account.
	AccountID *string `json:"accountId,omitempty" azure:"ro"`

	// READ-ONLY; The account creation time.
	CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"`

	// READ-ONLY; The full CName endpoint for this account.
	Endpoint *string `json:"endpoint,omitempty" azure:"ro"`

	// READ-ONLY; The account last modified time.
	LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning status of the Data Lake Store account.
	ProvisioningState *DataLakeStoreAccountStatus `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The state of the Data Lake Store account.
	State *DataLakeStoreAccountState `json:"state,omitempty" azure:"ro"`
}

AccountPropertiesBasic - The basic account specific properties that are associated with an underlying Data Lake Store account.

func (AccountPropertiesBasic) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AccountPropertiesBasic.

func (*AccountPropertiesBasic) UnmarshalJSON added in v0.3.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountPropertiesBasic.

type AccountsClient

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

AccountsClient contains the methods for the Accounts group. Don't use this type directly, use NewAccountsClient() instead.

func NewAccountsClient

func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error)

NewAccountsClient creates a new instance of AccountsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AccountsClient) BeginCreate

BeginCreate - Creates the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. parameters - Parameters supplied to create the Data Lake Store account. options - AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Create.json

package main

import (
	"context"
	"log"

	"time"

	"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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginCreate(ctx,
		"<resource-group-name>",
		"<account-name>",
		armdatalakestore.CreateDataLakeStoreAccountParameters{
			Identity: &armdatalakestore.EncryptionIdentity{
				Type: to.Ptr("<type>"),
			},
			Location: to.Ptr("<location>"),
			Properties: &armdatalakestore.CreateDataLakeStoreAccountProperties{
				DefaultGroup: to.Ptr("<default-group>"),
				EncryptionConfig: &armdatalakestore.EncryptionConfig{
					Type: to.Ptr(armdatalakestore.EncryptionConfigTypeUserManaged),
					KeyVaultMetaInfo: &armdatalakestore.KeyVaultMetaInfo{
						EncryptionKeyName:    to.Ptr("<encryption-key-name>"),
						EncryptionKeyVersion: to.Ptr("<encryption-key-version>"),
						KeyVaultResourceID:   to.Ptr("<key-vault-resource-id>"),
					},
				},
				EncryptionState:       to.Ptr(armdatalakestore.EncryptionStateEnabled),
				FirewallAllowAzureIPs: to.Ptr(armdatalakestore.FirewallAllowAzureIPsStateEnabled),
				FirewallRules: []*armdatalakestore.CreateFirewallRuleWithAccountParameters{
					{
						Name: to.Ptr("<name>"),
						Properties: &armdatalakestore.CreateOrUpdateFirewallRuleProperties{
							EndIPAddress:   to.Ptr("<end-ipaddress>"),
							StartIPAddress: to.Ptr("<start-ipaddress>"),
						},
					}},
				FirewallState:          to.Ptr(armdatalakestore.FirewallStateEnabled),
				NewTier:                to.Ptr(armdatalakestore.TierTypeConsumption),
				TrustedIDProviderState: to.Ptr(armdatalakestore.TrustedIDProviderStateEnabled),
				TrustedIDProviders: []*armdatalakestore.CreateTrustedIDProviderWithAccountParameters{
					{
						Name: to.Ptr("<name>"),
						Properties: &armdatalakestore.CreateOrUpdateTrustedIDProviderProperties{
							IDProvider: to.Ptr("<idprovider>"),
						},
					}},
			},
			Tags: map[string]*string{
				"test_key": to.Ptr("test_value"),
			},
		},
		&armdatalakestore.AccountsClientBeginCreateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountsClient) BeginDelete

func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*armruntime.Poller[AccountsClientDeleteResponse], error)

BeginDelete - Deletes the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Delete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<account-name>",
		&armdatalakestore.AccountsClientBeginDeleteOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
}
Output:

func (*AccountsClient) BeginUpdate

BeginUpdate - Updates the specified Data Lake Store account information. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. parameters - Parameters supplied to update the Data Lake Store account. options - AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Update.json

package main

import (
	"context"
	"log"

	"time"

	"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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<account-name>",
		armdatalakestore.UpdateDataLakeStoreAccountParameters{
			Properties: &armdatalakestore.UpdateDataLakeStoreAccountProperties{
				DefaultGroup: to.Ptr("<default-group>"),
				EncryptionConfig: &armdatalakestore.UpdateEncryptionConfig{
					KeyVaultMetaInfo: &armdatalakestore.UpdateKeyVaultMetaInfo{
						EncryptionKeyVersion: to.Ptr("<encryption-key-version>"),
					},
				},
				FirewallAllowAzureIPs:  to.Ptr(armdatalakestore.FirewallAllowAzureIPsStateEnabled),
				FirewallState:          to.Ptr(armdatalakestore.FirewallStateEnabled),
				NewTier:                to.Ptr(armdatalakestore.TierTypeConsumption),
				TrustedIDProviderState: to.Ptr(armdatalakestore.TrustedIDProviderStateEnabled),
			},
			Tags: map[string]*string{
				"test_key": to.Ptr("test_value"),
			},
		},
		&armdatalakestore.AccountsClientBeginUpdateOptions{ResumeToken: ""})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountsClient) CheckNameAvailability

CheckNameAvailability - Checks whether the specified account name is available or taken. If the operation fails it returns an *azcore.ResponseError type. location - The resource location without whitespace. parameters - Parameters supplied to check the Data Lake Store account name availability. options - AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_CheckNameAvailability.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CheckNameAvailability(ctx,
		"<location>",
		armdatalakestore.CheckNameAvailabilityParameters{
			Name: to.Ptr("<name>"),
			Type: to.Ptr(armdatalakestore.CheckNameAvailabilityParametersTypeMicrosoftDataLakeStoreAccounts),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountsClient) EnableKeyVault

func (client *AccountsClient) EnableKeyVault(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientEnableKeyVaultOptions) (AccountsClientEnableKeyVaultResponse, error)

EnableKeyVault - Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. options - AccountsClientEnableKeyVaultOptions contains the optional parameters for the AccountsClient.EnableKeyVault method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_EnableKeyVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.EnableKeyVault(ctx,
		"<resource-group-name>",
		"<account-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*AccountsClient) Get

func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error)

Get - Gets the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<account-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AccountsClient) List

List - Lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of results, if any. If the operation fails it returns an *azcore.ResponseError type. options - AccountsClientListOptions contains the optional parameters for the AccountsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_List.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.List(&armdatalakestore.AccountsClientListOptions{Filter: to.Ptr("<filter>"),
		Top:     to.Ptr[int32](1),
		Skip:    to.Ptr[int32](1),
		Select:  to.Ptr("<select>"),
		Orderby: to.Ptr("<orderby>"),
		Count:   to.Ptr(false),
	})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*AccountsClient) ListByResourceGroup

ListByResourceGroup - Lists the Data Lake Store accounts within a specific resource group. The response includes a link to the next page of results, if any. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. options - AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Accounts_ListByResourceGroup.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewAccountsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.ListByResourceGroup("<resource-group-name>",
		&armdatalakestore.AccountsClientListByResourceGroupOptions{Filter: to.Ptr("<filter>"),
			Top:     to.Ptr[int32](1),
			Skip:    to.Ptr[int32](1),
			Select:  to.Ptr("<select>"),
			Orderby: to.Ptr("<orderby>"),
			Count:   to.Ptr(false),
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AccountsClientBeginCreateOptions added in v0.3.0

type AccountsClientBeginCreateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method.

type AccountsClientBeginDeleteOptions added in v0.3.0

type AccountsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method.

type AccountsClientBeginUpdateOptions added in v0.3.0

type AccountsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method.

type AccountsClientCheckNameAvailabilityOptions added in v0.3.0

type AccountsClientCheckNameAvailabilityOptions struct {
}

AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability method.

type AccountsClientCheckNameAvailabilityResponse added in v0.3.0

type AccountsClientCheckNameAvailabilityResponse struct {
	NameAvailabilityInformation
}

AccountsClientCheckNameAvailabilityResponse contains the response from method AccountsClient.CheckNameAvailability.

type AccountsClientCreateResponse added in v0.3.0

type AccountsClientCreateResponse struct {
	Account
}

AccountsClientCreateResponse contains the response from method AccountsClient.Create.

type AccountsClientDeleteResponse added in v0.3.0

type AccountsClientDeleteResponse struct {
}

AccountsClientDeleteResponse contains the response from method AccountsClient.Delete.

type AccountsClientEnableKeyVaultOptions added in v0.3.0

type AccountsClientEnableKeyVaultOptions struct {
}

AccountsClientEnableKeyVaultOptions contains the optional parameters for the AccountsClient.EnableKeyVault method.

type AccountsClientEnableKeyVaultResponse added in v0.3.0

type AccountsClientEnableKeyVaultResponse struct {
}

AccountsClientEnableKeyVaultResponse contains the response from method AccountsClient.EnableKeyVault.

type AccountsClientGetOptions added in v0.3.0

type AccountsClientGetOptions struct {
}

AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method.

type AccountsClientGetResponse added in v0.3.0

type AccountsClientGetResponse struct {
	Account
}

AccountsClientGetResponse contains the response from method AccountsClient.Get.

type AccountsClientListByResourceGroupOptions added in v0.3.0

type AccountsClientListByResourceGroupOptions struct {
	// A Boolean value of true or false to request a count of the matching resources included with the resources in the response,
	// e.g. Categories?$count=true. Optional.
	Count *bool
	// OData filter. Optional.
	Filter *string
	// OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the
	// order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc.
	// Optional.
	Orderby *string
	// OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description.
	// Optional.
	Select *string
	// The number of items to skip over before returning elements. Optional.
	Skip *int32
	// The number of items to return. Optional.
	Top *int32
}

AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.ListByResourceGroup method.

type AccountsClientListByResourceGroupResponse added in v0.3.0

type AccountsClientListByResourceGroupResponse struct {
	AccountListResult
}

AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.ListByResourceGroup.

type AccountsClientListOptions added in v0.3.0

type AccountsClientListOptions struct {
	// The Boolean value of true or false to request a count of the matching resources included with the resources in the response,
	// e.g. Categories?$count=true. Optional.
	Count *bool
	// OData filter. Optional.
	Filter *string
	// OrderBy clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the
	// order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc.
	// Optional.
	Orderby *string
	// OData Select statement. Limits the properties on each entry to just those requested, e.g. Categories?$select=CategoryName,Description.
	// Optional.
	Select *string
	// The number of items to skip over before returning elements. Optional.
	Skip *int32
	// The number of items to return. Optional.
	Top *int32
}

AccountsClientListOptions contains the optional parameters for the AccountsClient.List method.

type AccountsClientListResponse added in v0.3.0

type AccountsClientListResponse struct {
	AccountListResult
}

AccountsClientListResponse contains the response from method AccountsClient.List.

type AccountsClientUpdateResponse added in v0.3.0

type AccountsClientUpdateResponse struct {
	Account
}

AccountsClientUpdateResponse contains the response from method AccountsClient.Update.

type CapabilityInformation

type CapabilityInformation struct {
	// READ-ONLY; The current number of accounts under this subscription.
	AccountCount *int32 `json:"accountCount,omitempty" azure:"ro"`

	// READ-ONLY; The maximum supported number of accounts under this subscription.
	MaxAccountCount *int32 `json:"maxAccountCount,omitempty" azure:"ro"`

	// READ-ONLY; The Boolean value of true or false to indicate the maintenance state.
	MigrationState *bool `json:"migrationState,omitempty" azure:"ro"`

	// READ-ONLY; The subscription state.
	State *SubscriptionState `json:"state,omitempty" azure:"ro"`

	// READ-ONLY; The subscription credentials that uniquely identifies the subscription.
	SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"`
}

CapabilityInformation - Subscription-level properties and limits for Data Lake Store.

type CheckNameAvailabilityParameters

type CheckNameAvailabilityParameters struct {
	// REQUIRED; The Data Lake Store name to check availability for.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeStore/accounts
	Type *CheckNameAvailabilityParametersType `json:"type,omitempty"`
}

CheckNameAvailabilityParameters - Data Lake Store account name availability check parameters.

type CheckNameAvailabilityParametersType

type CheckNameAvailabilityParametersType string

CheckNameAvailabilityParametersType - The resource type. Note: This should not be set by the user, as the constant value is Microsoft.DataLakeStore/accounts

const (
	CheckNameAvailabilityParametersTypeMicrosoftDataLakeStoreAccounts CheckNameAvailabilityParametersType = "Microsoft.DataLakeStore/accounts"
)

func PossibleCheckNameAvailabilityParametersTypeValues

func PossibleCheckNameAvailabilityParametersTypeValues() []CheckNameAvailabilityParametersType

PossibleCheckNameAvailabilityParametersTypeValues returns the possible values for the CheckNameAvailabilityParametersType const type.

type CreateDataLakeStoreAccountParameters

type CreateDataLakeStoreAccountParameters struct {
	// REQUIRED; The resource location.
	Location *string `json:"location,omitempty"`

	// The Key Vault encryption identity, if any.
	Identity *EncryptionIdentity `json:"identity,omitempty"`

	// The Data Lake Store account properties to use for creating.
	Properties *CreateDataLakeStoreAccountProperties `json:"properties,omitempty"`

	// The resource tags.
	Tags map[string]*string `json:"tags,omitempty"`
}

func (CreateDataLakeStoreAccountParameters) MarshalJSON

func (c CreateDataLakeStoreAccountParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CreateDataLakeStoreAccountParameters.

type CreateDataLakeStoreAccountProperties

type CreateDataLakeStoreAccountProperties struct {
	// The default owner group for all new folders and files created in the Data Lake Store account.
	DefaultGroup *string `json:"defaultGroup,omitempty"`

	// The Key Vault encryption configuration.
	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`

	// The current state of encryption for this Data Lake Store account.
	EncryptionState *EncryptionState `json:"encryptionState,omitempty"`

	// The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled,
	// this is not enforced.
	FirewallAllowAzureIPs *FirewallAllowAzureIPsState `json:"firewallAllowAzureIps,omitempty"`

	// The list of firewall rules associated with this Data Lake Store account.
	FirewallRules []*CreateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`

	// The current state of the IP address firewall for this Data Lake Store account.
	FirewallState *FirewallState `json:"firewallState,omitempty"`

	// The commitment tier to use for next month.
	NewTier *TierType `json:"newTier,omitempty"`

	// The current state of the trusted identity provider feature for this Data Lake Store account.
	TrustedIDProviderState *TrustedIDProviderState `json:"trustedIdProviderState,omitempty"`

	// The list of trusted identity providers associated with this Data Lake Store account.
	TrustedIDProviders []*CreateTrustedIDProviderWithAccountParameters `json:"trustedIdProviders,omitempty"`

	// The list of virtual network rules associated with this Data Lake Store account.
	VirtualNetworkRules []*CreateVirtualNetworkRuleWithAccountParameters `json:"virtualNetworkRules,omitempty"`
}

func (CreateDataLakeStoreAccountProperties) MarshalJSON

func (c CreateDataLakeStoreAccountProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CreateDataLakeStoreAccountProperties.

type CreateFirewallRuleWithAccountParameters

type CreateFirewallRuleWithAccountParameters struct {
	// REQUIRED; The unique name of the firewall rule to create.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The firewall rule properties to use when creating a new firewall rule.
	Properties *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"`
}

CreateFirewallRuleWithAccountParameters - The parameters used to create a new firewall rule while creating a new Data Lake Store account.

type CreateOrUpdateFirewallRuleParameters

type CreateOrUpdateFirewallRuleParameters struct {
	// REQUIRED; The firewall rule properties to use when creating a new firewall rule.
	Properties *CreateOrUpdateFirewallRuleProperties `json:"properties,omitempty"`
}

CreateOrUpdateFirewallRuleParameters - The parameters used to create a new firewall rule.

type CreateOrUpdateFirewallRuleProperties

type CreateOrUpdateFirewallRuleProperties struct {
	// REQUIRED; The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same
	// protocol.
	EndIPAddress *string `json:"endIpAddress,omitempty"`

	// REQUIRED; The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same
	// protocol.
	StartIPAddress *string `json:"startIpAddress,omitempty"`
}

CreateOrUpdateFirewallRuleProperties - The firewall rule properties to use when creating a new firewall rule.

type CreateOrUpdateTrustedIDProviderParameters

type CreateOrUpdateTrustedIDProviderParameters struct {
	// REQUIRED; The trusted identity provider properties to use when creating a new trusted identity provider.
	Properties *CreateOrUpdateTrustedIDProviderProperties `json:"properties,omitempty"`
}

CreateOrUpdateTrustedIDProviderParameters - The parameters used to create a new trusted identity provider.

type CreateOrUpdateTrustedIDProviderProperties

type CreateOrUpdateTrustedIDProviderProperties struct {
	// REQUIRED; The URL of this trusted identity provider.
	IDProvider *string `json:"idProvider,omitempty"`
}

CreateOrUpdateTrustedIDProviderProperties - The trusted identity provider properties to use when creating a new trusted identity provider.

type CreateOrUpdateVirtualNetworkRuleParameters

type CreateOrUpdateVirtualNetworkRuleParameters struct {
	// REQUIRED; The virtual network rule properties to use when creating a new virtual network rule.
	Properties *CreateOrUpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
}

CreateOrUpdateVirtualNetworkRuleParameters - The parameters used to create a new virtual network rule.

type CreateOrUpdateVirtualNetworkRuleProperties

type CreateOrUpdateVirtualNetworkRuleProperties struct {
	// REQUIRED; The resource identifier for the subnet.
	SubnetID *string `json:"subnetId,omitempty"`
}

CreateOrUpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when creating a new virtual network rule.

type CreateTrustedIDProviderWithAccountParameters

type CreateTrustedIDProviderWithAccountParameters struct {
	// REQUIRED; The unique name of the trusted identity provider to create.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The trusted identity provider properties to use when creating a new trusted identity provider.
	Properties *CreateOrUpdateTrustedIDProviderProperties `json:"properties,omitempty"`
}

CreateTrustedIDProviderWithAccountParameters - The parameters used to create a new trusted identity provider while creating a new Data Lake Store account.

type CreateVirtualNetworkRuleWithAccountParameters

type CreateVirtualNetworkRuleWithAccountParameters struct {
	// REQUIRED; The unique name of the virtual network rule to create.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The virtual network rule properties to use when creating a new virtual network rule.
	Properties *CreateOrUpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
}

CreateVirtualNetworkRuleWithAccountParameters - The parameters used to create a new virtual network rule while creating a new Data Lake Store account.

type DataLakeStoreAccountState

type DataLakeStoreAccountState string

DataLakeStoreAccountState - The state of the Data Lake Store account.

const (
	DataLakeStoreAccountStateActive    DataLakeStoreAccountState = "Active"
	DataLakeStoreAccountStateSuspended DataLakeStoreAccountState = "Suspended"
)

func PossibleDataLakeStoreAccountStateValues

func PossibleDataLakeStoreAccountStateValues() []DataLakeStoreAccountState

PossibleDataLakeStoreAccountStateValues returns the possible values for the DataLakeStoreAccountState const type.

type DataLakeStoreAccountStatus

type DataLakeStoreAccountStatus string

DataLakeStoreAccountStatus - The provisioning status of the Data Lake Store account.

const (
	DataLakeStoreAccountStatusFailed     DataLakeStoreAccountStatus = "Failed"
	DataLakeStoreAccountStatusCreating   DataLakeStoreAccountStatus = "Creating"
	DataLakeStoreAccountStatusRunning    DataLakeStoreAccountStatus = "Running"
	DataLakeStoreAccountStatusSucceeded  DataLakeStoreAccountStatus = "Succeeded"
	DataLakeStoreAccountStatusPatching   DataLakeStoreAccountStatus = "Patching"
	DataLakeStoreAccountStatusSuspending DataLakeStoreAccountStatus = "Suspending"
	DataLakeStoreAccountStatusResuming   DataLakeStoreAccountStatus = "Resuming"
	DataLakeStoreAccountStatusDeleting   DataLakeStoreAccountStatus = "Deleting"
	DataLakeStoreAccountStatusDeleted    DataLakeStoreAccountStatus = "Deleted"
	DataLakeStoreAccountStatusUndeleting DataLakeStoreAccountStatus = "Undeleting"
	DataLakeStoreAccountStatusCanceled   DataLakeStoreAccountStatus = "Canceled"
)

func PossibleDataLakeStoreAccountStatusValues

func PossibleDataLakeStoreAccountStatusValues() []DataLakeStoreAccountStatus

PossibleDataLakeStoreAccountStatusValues returns the possible values for the DataLakeStoreAccountStatus const type.

type EncryptionConfig

type EncryptionConfig struct {
	// REQUIRED; The type of encryption configuration being used. Currently the only supported types are 'UserManaged' and 'ServiceManaged'.
	Type *EncryptionConfigType `json:"type,omitempty"`

	// The Key Vault information for connecting to user managed encryption keys.
	KeyVaultMetaInfo *KeyVaultMetaInfo `json:"keyVaultMetaInfo,omitempty"`
}

EncryptionConfig - The encryption configuration for the account.

type EncryptionConfigType

type EncryptionConfigType string

EncryptionConfigType - The type of encryption configuration being used. Currently the only supported types are 'UserManaged' and 'ServiceManaged'.

const (
	EncryptionConfigTypeUserManaged    EncryptionConfigType = "UserManaged"
	EncryptionConfigTypeServiceManaged EncryptionConfigType = "ServiceManaged"
)

func PossibleEncryptionConfigTypeValues

func PossibleEncryptionConfigTypeValues() []EncryptionConfigType

PossibleEncryptionConfigTypeValues returns the possible values for the EncryptionConfigType const type.

type EncryptionIdentity

type EncryptionIdentity struct {
	// REQUIRED; The type of encryption being used. Currently the only supported type is 'SystemAssigned'.
	Type *string `json:"type,omitempty"`

	// READ-ONLY; The principal identifier associated with the encryption.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant identifier associated with the encryption.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

EncryptionIdentity - The encryption identity properties.

type EncryptionProvisioningState

type EncryptionProvisioningState string

EncryptionProvisioningState - The current state of encryption provisioning for this Data Lake Store account.

const (
	EncryptionProvisioningStateCreating  EncryptionProvisioningState = "Creating"
	EncryptionProvisioningStateSucceeded EncryptionProvisioningState = "Succeeded"
)

func PossibleEncryptionProvisioningStateValues

func PossibleEncryptionProvisioningStateValues() []EncryptionProvisioningState

PossibleEncryptionProvisioningStateValues returns the possible values for the EncryptionProvisioningState const type.

type EncryptionState

type EncryptionState string

EncryptionState - The current state of encryption for this Data Lake Store account.

const (
	EncryptionStateEnabled  EncryptionState = "Enabled"
	EncryptionStateDisabled EncryptionState = "Disabled"
)

func PossibleEncryptionStateValues

func PossibleEncryptionStateValues() []EncryptionState

PossibleEncryptionStateValues returns the possible values for the EncryptionState const type.

type FirewallAllowAzureIPsState

type FirewallAllowAzureIPsState string

FirewallAllowAzureIPsState - The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled, this is not enforced.

const (
	FirewallAllowAzureIPsStateEnabled  FirewallAllowAzureIPsState = "Enabled"
	FirewallAllowAzureIPsStateDisabled FirewallAllowAzureIPsState = "Disabled"
)

func PossibleFirewallAllowAzureIPsStateValues

func PossibleFirewallAllowAzureIPsStateValues() []FirewallAllowAzureIPsState

PossibleFirewallAllowAzureIPsStateValues returns the possible values for the FirewallAllowAzureIPsState const type.

type FirewallRule

type FirewallRule struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The firewall rule properties.
	Properties *FirewallRuleProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

FirewallRule - Data Lake Store firewall rule information.

type FirewallRuleListResult

type FirewallRuleListResult struct {
	// READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; The results of the list operation.
	Value []*FirewallRule `json:"value,omitempty" azure:"ro"`
}

FirewallRuleListResult - Data Lake Store firewall rule list information.

func (FirewallRuleListResult) MarshalJSON

func (f FirewallRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult.

type FirewallRuleProperties

type FirewallRuleProperties struct {
	// READ-ONLY; The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same
	// protocol.
	EndIPAddress *string `json:"endIpAddress,omitempty" azure:"ro"`

	// READ-ONLY; The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the
	// same protocol.
	StartIPAddress *string `json:"startIpAddress,omitempty" azure:"ro"`
}

FirewallRuleProperties - The firewall rule properties.

type FirewallRulesClient

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

FirewallRulesClient contains the methods for the FirewallRules group. Don't use this type directly, use NewFirewallRulesClient() instead.

func NewFirewallRulesClient

func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error)

NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*FirewallRulesClient) CreateOrUpdate

func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters CreateOrUpdateFirewallRuleParameters, options *FirewallRulesClientCreateOrUpdateOptions) (FirewallRulesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates the specified firewall rule. During update, the firewall rule with the specified name will be replaced with this new firewall rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. firewallRuleName - The name of the firewall rule to create or update. parameters - Parameters supplied to create or update the firewall rule. options - FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_CreateOrUpdate.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewFirewallRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<firewall-rule-name>",
		armdatalakestore.CreateOrUpdateFirewallRuleParameters{
			Properties: &armdatalakestore.CreateOrUpdateFirewallRuleProperties{
				EndIPAddress:   to.Ptr("<end-ipaddress>"),
				StartIPAddress: to.Ptr("<start-ipaddress>"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FirewallRulesClient) Delete

func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, options *FirewallRulesClientDeleteOptions) (FirewallRulesClientDeleteResponse, error)

Delete - Deletes the specified firewall rule from the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. firewallRuleName - The name of the firewall rule to delete. options - FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewFirewallRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<firewall-rule-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*FirewallRulesClient) Get

func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error)

Get - Gets the specified Data Lake Store firewall rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. firewallRuleName - The name of the firewall rule to retrieve. options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewFirewallRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<firewall-rule-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FirewallRulesClient) ListByAccount

ListByAccount - Lists the Data Lake Store firewall rules within the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. options - FirewallRulesClientListByAccountOptions contains the optional parameters for the FirewallRulesClient.ListByAccount method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_ListByAccount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewFirewallRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.ListByAccount("<resource-group-name>",
		"<account-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*FirewallRulesClient) Update

func (client *FirewallRulesClient) Update(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, options *FirewallRulesClientUpdateOptions) (FirewallRulesClientUpdateResponse, error)

Update - Updates the specified firewall rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. firewallRuleName - The name of the firewall rule to update. options - FirewallRulesClientUpdateOptions contains the optional parameters for the FirewallRulesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/FirewallRules_Update.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewFirewallRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<firewall-rule-name>",
		&armdatalakestore.FirewallRulesClientUpdateOptions{Parameters: &armdatalakestore.UpdateFirewallRuleParameters{
			Properties: &armdatalakestore.UpdateFirewallRuleProperties{
				EndIPAddress:   to.Ptr("<end-ipaddress>"),
				StartIPAddress: to.Ptr("<start-ipaddress>"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type FirewallRulesClientCreateOrUpdateOptions added in v0.3.0

type FirewallRulesClientCreateOrUpdateOptions struct {
}

FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.

type FirewallRulesClientCreateOrUpdateResponse added in v0.3.0

type FirewallRulesClientCreateOrUpdateResponse struct {
	FirewallRule
}

FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate.

type FirewallRulesClientDeleteOptions added in v0.3.0

type FirewallRulesClientDeleteOptions struct {
}

FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.

type FirewallRulesClientDeleteResponse added in v0.3.0

type FirewallRulesClientDeleteResponse struct {
}

FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.Delete.

type FirewallRulesClientGetOptions added in v0.3.0

type FirewallRulesClientGetOptions struct {
}

FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.

type FirewallRulesClientGetResponse added in v0.3.0

type FirewallRulesClientGetResponse struct {
	FirewallRule
}

FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.

type FirewallRulesClientListByAccountOptions added in v0.3.0

type FirewallRulesClientListByAccountOptions struct {
}

FirewallRulesClientListByAccountOptions contains the optional parameters for the FirewallRulesClient.ListByAccount method.

type FirewallRulesClientListByAccountResponse added in v0.3.0

type FirewallRulesClientListByAccountResponse struct {
	FirewallRuleListResult
}

FirewallRulesClientListByAccountResponse contains the response from method FirewallRulesClient.ListByAccount.

type FirewallRulesClientUpdateOptions added in v0.3.0

type FirewallRulesClientUpdateOptions struct {
	// Parameters supplied to update the firewall rule.
	Parameters *UpdateFirewallRuleParameters
}

FirewallRulesClientUpdateOptions contains the optional parameters for the FirewallRulesClient.Update method.

type FirewallRulesClientUpdateResponse added in v0.3.0

type FirewallRulesClientUpdateResponse struct {
	FirewallRule
}

FirewallRulesClientUpdateResponse contains the response from method FirewallRulesClient.Update.

type FirewallState

type FirewallState string

FirewallState - The current state of the IP address firewall for this Data Lake Store account.

const (
	FirewallStateEnabled  FirewallState = "Enabled"
	FirewallStateDisabled FirewallState = "Disabled"
)

func PossibleFirewallStateValues

func PossibleFirewallStateValues() []FirewallState

PossibleFirewallStateValues returns the possible values for the FirewallState const type.

type KeyVaultMetaInfo

type KeyVaultMetaInfo struct {
	// REQUIRED; The name of the user managed encryption key.
	EncryptionKeyName *string `json:"encryptionKeyName,omitempty"`

	// REQUIRED; The version of the user managed encryption key.
	EncryptionKeyVersion *string `json:"encryptionKeyVersion,omitempty"`

	// REQUIRED; The resource identifier for the user managed Key Vault being used to encrypt.
	KeyVaultResourceID *string `json:"keyVaultResourceId,omitempty"`
}

KeyVaultMetaInfo - Metadata information used by account encryption.

type LocationsClient

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

LocationsClient contains the methods for the Locations group. Don't use this type directly, use NewLocationsClient() instead.

func NewLocationsClient

func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)

NewLocationsClient creates a new instance of LocationsClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LocationsClient) GetCapability

GetCapability - Gets subscription-level properties and limits for Data Lake Store specified by resource location. If the operation fails it returns an *azcore.ResponseError type. location - The resource location without whitespace. options - LocationsClientGetCapabilityOptions contains the optional parameters for the LocationsClient.GetCapability method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetCapability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewLocationsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.GetCapability(ctx,
		"<location>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*LocationsClient) GetUsage

GetUsage - Gets the current usage count and the limit for the resources of the location under the subscription. If the operation fails it returns an *azcore.ResponseError type. location - The resource location without whitespace. options - LocationsClientGetUsageOptions contains the optional parameters for the LocationsClient.GetUsage method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewLocationsClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.GetUsage("<location>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type LocationsClientGetCapabilityOptions added in v0.3.0

type LocationsClientGetCapabilityOptions struct {
}

LocationsClientGetCapabilityOptions contains the optional parameters for the LocationsClient.GetCapability method.

type LocationsClientGetCapabilityResponse added in v0.3.0

type LocationsClientGetCapabilityResponse struct {
	CapabilityInformation
}

LocationsClientGetCapabilityResponse contains the response from method LocationsClient.GetCapability.

type LocationsClientGetUsageOptions added in v0.3.0

type LocationsClientGetUsageOptions struct {
}

LocationsClientGetUsageOptions contains the optional parameters for the LocationsClient.GetUsage method.

type LocationsClientGetUsageResponse added in v0.3.0

type LocationsClientGetUsageResponse struct {
	UsageListResult
}

LocationsClientGetUsageResponse contains the response from method LocationsClient.GetUsage.

type NameAvailabilityInformation

type NameAvailabilityInformation struct {
	// READ-ONLY; The message describing why the Data Lake Store account name is not available, if nameAvailable is false.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The Boolean value of true or false to indicate whether the Data Lake Store account name is available or not.
	NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"`

	// READ-ONLY; The reason why the Data Lake Store account name is not available, if nameAvailable is false.
	Reason *string `json:"reason,omitempty" azure:"ro"`
}

NameAvailabilityInformation - Data Lake Store account name availability result information.

type Operation

type Operation struct {
	// The display information for the operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// READ-ONLY; The name of the operation.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The intended executor of the operation.
	Origin *OperationOrigin `json:"origin,omitempty" azure:"ro"`
}

Operation - An available operation for Data Lake Store.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; A friendly description of the operation.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; A friendly name of the operation.
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The resource provider of the operation.
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The resource type of the operation.
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationDisplay - The display information for a particular operation.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; The results of the list operation.
	Value []*Operation `json:"value,omitempty" azure:"ro"`
}

OperationListResult - The list of available operations for Data Lake Store.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

type OperationOrigin

type OperationOrigin string

OperationOrigin - The intended executor of the operation.

const (
	OperationOriginSystem     OperationOrigin = "system"
	OperationOriginUser       OperationOrigin = "user"
	OperationOriginUserSystem OperationOrigin = "user,system"
)

func PossibleOperationOriginValues

func PossibleOperationOriginValues() []OperationOrigin

PossibleOperationOriginValues returns the possible values for the OperationOrigin const type.

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) List

List - Lists all of the available Data Lake Store REST API operations. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.List(ctx,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type Resource

type Resource struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource tags.
	Tags map[string]*string `json:"tags,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - The resource model definition.

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

type SubResource

type SubResource struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

SubResource - The resource model definition for a nested resource.

type SubscriptionState

type SubscriptionState string

SubscriptionState - The subscription state.

const (
	SubscriptionStateDeleted      SubscriptionState = "Deleted"
	SubscriptionStateRegistered   SubscriptionState = "Registered"
	SubscriptionStateSuspended    SubscriptionState = "Suspended"
	SubscriptionStateUnregistered SubscriptionState = "Unregistered"
	SubscriptionStateWarned       SubscriptionState = "Warned"
)

func PossibleSubscriptionStateValues

func PossibleSubscriptionStateValues() []SubscriptionState

PossibleSubscriptionStateValues returns the possible values for the SubscriptionState const type.

type TierType

type TierType string

TierType - The commitment tier to use for next month.

const (
	TierTypeConsumption     TierType = "Consumption"
	TierTypeCommitment1TB   TierType = "Commitment_1TB"
	TierTypeCommitment10TB  TierType = "Commitment_10TB"
	TierTypeCommitment100TB TierType = "Commitment_100TB"
	TierTypeCommitment500TB TierType = "Commitment_500TB"
	TierTypeCommitment1PB   TierType = "Commitment_1PB"
	TierTypeCommitment5PB   TierType = "Commitment_5PB"
)

func PossibleTierTypeValues

func PossibleTierTypeValues() []TierType

PossibleTierTypeValues returns the possible values for the TierType const type.

type TrustedIDProvider

type TrustedIDProvider struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The trusted identity provider properties.
	Properties *TrustedIDProviderProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrustedIDProvider - Data Lake Store trusted identity provider information.

type TrustedIDProviderListResult

type TrustedIDProviderListResult struct {
	// READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; The results of the list operation.
	Value []*TrustedIDProvider `json:"value,omitempty" azure:"ro"`
}

TrustedIDProviderListResult - Data Lake Store trusted identity provider list information.

func (TrustedIDProviderListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrustedIDProviderListResult.

type TrustedIDProviderProperties

type TrustedIDProviderProperties struct {
	// READ-ONLY; The URL of this trusted identity provider.
	IDProvider *string `json:"idProvider,omitempty" azure:"ro"`
}

TrustedIDProviderProperties - The trusted identity provider properties.

type TrustedIDProviderState

type TrustedIDProviderState string

TrustedIDProviderState - The current state of the trusted identity provider feature for this Data Lake Store account.

const (
	TrustedIDProviderStateEnabled  TrustedIDProviderState = "Enabled"
	TrustedIDProviderStateDisabled TrustedIDProviderState = "Disabled"
)

func PossibleTrustedIDProviderStateValues

func PossibleTrustedIDProviderStateValues() []TrustedIDProviderState

PossibleTrustedIDProviderStateValues returns the possible values for the TrustedIDProviderState const type.

type TrustedIDProvidersClient

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

TrustedIDProvidersClient contains the methods for the TrustedIDProviders group. Don't use this type directly, use NewTrustedIDProvidersClient() instead.

func NewTrustedIDProvidersClient

func NewTrustedIDProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TrustedIDProvidersClient, error)

NewTrustedIDProvidersClient creates a new instance of TrustedIDProvidersClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TrustedIDProvidersClient) CreateOrUpdate

CreateOrUpdate - Creates or updates the specified trusted identity provider. During update, the trusted identity provider with the specified name will be replaced with this new provider If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. trustedIDProviderName - The name of the trusted identity provider. This is used for differentiation of providers in the account. parameters - Parameters supplied to create or replace the trusted identity provider. options - TrustedIDProvidersClientCreateOrUpdateOptions contains the optional parameters for the TrustedIDProvidersClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_CreateOrUpdate.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewTrustedIDProvidersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<trusted-idprovider-name>",
		armdatalakestore.CreateOrUpdateTrustedIDProviderParameters{
			Properties: &armdatalakestore.CreateOrUpdateTrustedIDProviderProperties{
				IDProvider: to.Ptr("<idprovider>"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TrustedIDProvidersClient) Delete

func (client *TrustedIDProvidersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string, options *TrustedIDProvidersClientDeleteOptions) (TrustedIDProvidersClientDeleteResponse, error)

Delete - Deletes the specified trusted identity provider from the specified Data Lake Store account If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. trustedIDProviderName - The name of the trusted identity provider to delete. options - TrustedIDProvidersClientDeleteOptions contains the optional parameters for the TrustedIDProvidersClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewTrustedIDProvidersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<trusted-idprovider-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*TrustedIDProvidersClient) Get

func (client *TrustedIDProvidersClient) Get(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string, options *TrustedIDProvidersClientGetOptions) (TrustedIDProvidersClientGetResponse, error)

Get - Gets the specified Data Lake Store trusted identity provider. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. trustedIDProviderName - The name of the trusted identity provider to retrieve. options - TrustedIDProvidersClientGetOptions contains the optional parameters for the TrustedIDProvidersClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewTrustedIDProvidersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<trusted-idprovider-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*TrustedIDProvidersClient) ListByAccount

ListByAccount - Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. options - TrustedIDProvidersClientListByAccountOptions contains the optional parameters for the TrustedIDProvidersClient.ListByAccount method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_ListByAccount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewTrustedIDProvidersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.ListByAccount("<resource-group-name>",
		"<account-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*TrustedIDProvidersClient) Update

func (client *TrustedIDProvidersClient) Update(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string, options *TrustedIDProvidersClientUpdateOptions) (TrustedIDProvidersClientUpdateResponse, error)

Update - Updates the specified trusted identity provider. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. trustedIDProviderName - The name of the trusted identity provider. This is used for differentiation of providers in the account. options - TrustedIDProvidersClientUpdateOptions contains the optional parameters for the TrustedIDProvidersClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/TrustedIdProviders_Update.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewTrustedIDProvidersClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<trusted-idprovider-name>",
		&armdatalakestore.TrustedIDProvidersClientUpdateOptions{Parameters: &armdatalakestore.UpdateTrustedIDProviderParameters{
			Properties: &armdatalakestore.UpdateTrustedIDProviderProperties{
				IDProvider: to.Ptr("<idprovider>"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type TrustedIDProvidersClientCreateOrUpdateOptions added in v0.3.0

type TrustedIDProvidersClientCreateOrUpdateOptions struct {
}

TrustedIDProvidersClientCreateOrUpdateOptions contains the optional parameters for the TrustedIDProvidersClient.CreateOrUpdate method.

type TrustedIDProvidersClientCreateOrUpdateResponse added in v0.3.0

type TrustedIDProvidersClientCreateOrUpdateResponse struct {
	TrustedIDProvider
}

TrustedIDProvidersClientCreateOrUpdateResponse contains the response from method TrustedIDProvidersClient.CreateOrUpdate.

type TrustedIDProvidersClientDeleteOptions added in v0.3.0

type TrustedIDProvidersClientDeleteOptions struct {
}

TrustedIDProvidersClientDeleteOptions contains the optional parameters for the TrustedIDProvidersClient.Delete method.

type TrustedIDProvidersClientDeleteResponse added in v0.3.0

type TrustedIDProvidersClientDeleteResponse struct {
}

TrustedIDProvidersClientDeleteResponse contains the response from method TrustedIDProvidersClient.Delete.

type TrustedIDProvidersClientGetOptions added in v0.3.0

type TrustedIDProvidersClientGetOptions struct {
}

TrustedIDProvidersClientGetOptions contains the optional parameters for the TrustedIDProvidersClient.Get method.

type TrustedIDProvidersClientGetResponse added in v0.3.0

type TrustedIDProvidersClientGetResponse struct {
	TrustedIDProvider
}

TrustedIDProvidersClientGetResponse contains the response from method TrustedIDProvidersClient.Get.

type TrustedIDProvidersClientListByAccountOptions added in v0.3.0

type TrustedIDProvidersClientListByAccountOptions struct {
}

TrustedIDProvidersClientListByAccountOptions contains the optional parameters for the TrustedIDProvidersClient.ListByAccount method.

type TrustedIDProvidersClientListByAccountResponse added in v0.3.0

type TrustedIDProvidersClientListByAccountResponse struct {
	TrustedIDProviderListResult
}

TrustedIDProvidersClientListByAccountResponse contains the response from method TrustedIDProvidersClient.ListByAccount.

type TrustedIDProvidersClientUpdateOptions added in v0.3.0

type TrustedIDProvidersClientUpdateOptions struct {
	// Parameters supplied to update the trusted identity provider.
	Parameters *UpdateTrustedIDProviderParameters
}

TrustedIDProvidersClientUpdateOptions contains the optional parameters for the TrustedIDProvidersClient.Update method.

type TrustedIDProvidersClientUpdateResponse added in v0.3.0

type TrustedIDProvidersClientUpdateResponse struct {
	TrustedIDProvider
}

TrustedIDProvidersClientUpdateResponse contains the response from method TrustedIDProvidersClient.Update.

type UpdateDataLakeStoreAccountParameters

type UpdateDataLakeStoreAccountParameters struct {
	// The Data Lake Store account properties to update.
	Properties *UpdateDataLakeStoreAccountProperties `json:"properties,omitempty"`

	// Resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

UpdateDataLakeStoreAccountParameters - Data Lake Store account information to update.

func (UpdateDataLakeStoreAccountParameters) MarshalJSON

func (u UpdateDataLakeStoreAccountParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateDataLakeStoreAccountParameters.

type UpdateDataLakeStoreAccountProperties

type UpdateDataLakeStoreAccountProperties struct {
	// The default owner group for all new folders and files created in the Data Lake Store account.
	DefaultGroup *string `json:"defaultGroup,omitempty"`

	// Used for rotation of user managed Key Vault keys. Can only be used to rotate a user managed encryption Key Vault key.
	EncryptionConfig *UpdateEncryptionConfig `json:"encryptionConfig,omitempty"`

	// The current state of allowing or disallowing IPs originating within Azure through the firewall. If the firewall is disabled,
	// this is not enforced.
	FirewallAllowAzureIPs *FirewallAllowAzureIPsState `json:"firewallAllowAzureIps,omitempty"`

	// The list of firewall rules associated with this Data Lake Store account.
	FirewallRules []*UpdateFirewallRuleWithAccountParameters `json:"firewallRules,omitempty"`

	// The current state of the IP address firewall for this Data Lake Store account. Disabling the firewall does not remove existing
	// rules, they will just be ignored until the firewall is re-enabled.
	FirewallState *FirewallState `json:"firewallState,omitempty"`

	// The commitment tier to use for next month.
	NewTier *TierType `json:"newTier,omitempty"`

	// The current state of the trusted identity provider feature for this Data Lake Store account. Disabling trusted identity
	// provider functionality does not remove the providers, they will just be ignored
	// until this feature is re-enabled.
	TrustedIDProviderState *TrustedIDProviderState `json:"trustedIdProviderState,omitempty"`

	// The list of trusted identity providers associated with this Data Lake Store account.
	TrustedIDProviders []*UpdateTrustedIDProviderWithAccountParameters `json:"trustedIdProviders,omitempty"`

	// The list of virtual network rules associated with this Data Lake Store account.
	VirtualNetworkRules []*UpdateVirtualNetworkRuleWithAccountParameters `json:"virtualNetworkRules,omitempty"`
}

UpdateDataLakeStoreAccountProperties - Data Lake Store account properties information to be updated.

func (UpdateDataLakeStoreAccountProperties) MarshalJSON

func (u UpdateDataLakeStoreAccountProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateDataLakeStoreAccountProperties.

type UpdateEncryptionConfig

type UpdateEncryptionConfig struct {
	// The updated Key Vault key to use in user managed key rotation.
	KeyVaultMetaInfo *UpdateKeyVaultMetaInfo `json:"keyVaultMetaInfo,omitempty"`
}

UpdateEncryptionConfig - The encryption configuration used to update a user managed Key Vault key.

type UpdateFirewallRuleParameters

type UpdateFirewallRuleParameters struct {
	// The firewall rule properties to use when updating a firewall rule.
	Properties *UpdateFirewallRuleProperties `json:"properties,omitempty"`
}

UpdateFirewallRuleParameters - The parameters used to update a firewall rule.

func (UpdateFirewallRuleParameters) MarshalJSON

func (u UpdateFirewallRuleParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateFirewallRuleParameters.

type UpdateFirewallRuleProperties

type UpdateFirewallRuleProperties struct {
	// The end IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol.
	EndIPAddress *string `json:"endIpAddress,omitempty"`

	// The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol.
	StartIPAddress *string `json:"startIpAddress,omitempty"`
}

UpdateFirewallRuleProperties - The firewall rule properties to use when updating a firewall rule.

type UpdateFirewallRuleWithAccountParameters

type UpdateFirewallRuleWithAccountParameters struct {
	// REQUIRED; The unique name of the firewall rule to update.
	Name *string `json:"name,omitempty"`

	// The firewall rule properties to use when updating a firewall rule.
	Properties *UpdateFirewallRuleProperties `json:"properties,omitempty"`
}

UpdateFirewallRuleWithAccountParameters - The parameters used to update a firewall rule while updating a Data Lake Store account.

type UpdateKeyVaultMetaInfo

type UpdateKeyVaultMetaInfo struct {
	// The version of the user managed encryption key to update through a key rotation.
	EncryptionKeyVersion *string `json:"encryptionKeyVersion,omitempty"`
}

UpdateKeyVaultMetaInfo - The Key Vault update information used for user managed key rotation.

type UpdateTrustedIDProviderParameters

type UpdateTrustedIDProviderParameters struct {
	// The trusted identity provider properties to use when updating a trusted identity provider.
	Properties *UpdateTrustedIDProviderProperties `json:"properties,omitempty"`
}

UpdateTrustedIDProviderParameters - The parameters used to update a trusted identity provider.

func (UpdateTrustedIDProviderParameters) MarshalJSON

func (u UpdateTrustedIDProviderParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateTrustedIDProviderParameters.

type UpdateTrustedIDProviderProperties

type UpdateTrustedIDProviderProperties struct {
	// The URL of this trusted identity provider.
	IDProvider *string `json:"idProvider,omitempty"`
}

UpdateTrustedIDProviderProperties - The trusted identity provider properties to use when updating a trusted identity provider.

type UpdateTrustedIDProviderWithAccountParameters

type UpdateTrustedIDProviderWithAccountParameters struct {
	// REQUIRED; The unique name of the trusted identity provider to update.
	Name *string `json:"name,omitempty"`

	// The trusted identity provider properties to use when updating a trusted identity provider.
	Properties *UpdateTrustedIDProviderProperties `json:"properties,omitempty"`
}

UpdateTrustedIDProviderWithAccountParameters - The parameters used to update a trusted identity provider while updating a Data Lake Store account.

type UpdateVirtualNetworkRuleParameters

type UpdateVirtualNetworkRuleParameters struct {
	// The virtual network rule properties to use when updating a virtual network rule.
	Properties *UpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
}

UpdateVirtualNetworkRuleParameters - The parameters used to update a virtual network rule.

func (UpdateVirtualNetworkRuleParameters) MarshalJSON

func (u UpdateVirtualNetworkRuleParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UpdateVirtualNetworkRuleParameters.

type UpdateVirtualNetworkRuleProperties

type UpdateVirtualNetworkRuleProperties struct {
	// The resource identifier for the subnet.
	SubnetID *string `json:"subnetId,omitempty"`
}

UpdateVirtualNetworkRuleProperties - The virtual network rule properties to use when updating a virtual network rule.

type UpdateVirtualNetworkRuleWithAccountParameters

type UpdateVirtualNetworkRuleWithAccountParameters struct {
	// REQUIRED; The unique name of the virtual network rule to update.
	Name *string `json:"name,omitempty"`

	// The virtual network rule properties to use when updating a virtual network rule.
	Properties *UpdateVirtualNetworkRuleProperties `json:"properties,omitempty"`
}

UpdateVirtualNetworkRuleWithAccountParameters - The parameters used to update a virtual network rule while updating a Data Lake Store account.

type Usage

type Usage struct {
	// READ-ONLY; Gets the current count of the allocated resources in the subscription.
	CurrentValue *int32 `json:"currentValue,omitempty" azure:"ro"`

	// READ-ONLY; Resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Gets the maximum count of the resources that can be allocated in the subscription.
	Limit *int32 `json:"limit,omitempty" azure:"ro"`

	// READ-ONLY; Gets the name of the type of usage.
	Name *UsageName `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Gets the unit of measurement.
	Unit *UsageUnit `json:"unit,omitempty" azure:"ro"`
}

Usage - Describes the Resource Usage.

type UsageListResult

type UsageListResult struct {
	// Gets or sets the list of Storage Resource Usages.
	Value []*Usage `json:"value,omitempty"`
}

UsageListResult - The response from the List Usages operation.

func (UsageListResult) MarshalJSON

func (u UsageListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsageListResult.

type UsageName

type UsageName struct {
	// READ-ONLY; Gets a localized string describing the resource name.
	LocalizedValue *string `json:"localizedValue,omitempty" azure:"ro"`

	// READ-ONLY; Gets a string describing the resource name.
	Value *string `json:"value,omitempty" azure:"ro"`
}

UsageName - The usage names that can be used.

type UsageUnit

type UsageUnit string

UsageUnit - Gets the unit of measurement.

const (
	UsageUnitCount           UsageUnit = "Count"
	UsageUnitBytes           UsageUnit = "Bytes"
	UsageUnitSeconds         UsageUnit = "Seconds"
	UsageUnitPercent         UsageUnit = "Percent"
	UsageUnitCountsPerSecond UsageUnit = "CountsPerSecond"
	UsageUnitBytesPerSecond  UsageUnit = "BytesPerSecond"
)

func PossibleUsageUnitValues

func PossibleUsageUnitValues() []UsageUnit

PossibleUsageUnitValues returns the possible values for the UsageUnit const type.

type VirtualNetworkRule

type VirtualNetworkRule struct {
	// READ-ONLY; The resource identifier.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The virtual network rule properties.
	Properties *VirtualNetworkRuleProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

VirtualNetworkRule - Data Lake Store virtual network rule information.

type VirtualNetworkRuleListResult

type VirtualNetworkRuleListResult struct {
	// READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; The results of the list operation.
	Value []*VirtualNetworkRule `json:"value,omitempty" azure:"ro"`
}

VirtualNetworkRuleListResult - Data Lake Store virtual network rule list information.

func (VirtualNetworkRuleListResult) MarshalJSON

func (v VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleListResult.

type VirtualNetworkRuleProperties

type VirtualNetworkRuleProperties struct {
	// READ-ONLY; The resource identifier for the subnet.
	SubnetID *string `json:"subnetId,omitempty" azure:"ro"`
}

VirtualNetworkRuleProperties - The virtual network rule properties.

type VirtualNetworkRulesClient

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

VirtualNetworkRulesClient contains the methods for the VirtualNetworkRules group. Don't use this type directly, use NewVirtualNetworkRulesClient() instead.

func NewVirtualNetworkRulesClient

func NewVirtualNetworkRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkRulesClient, error)

NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient with the specified values. subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*VirtualNetworkRulesClient) CreateOrUpdate

CreateOrUpdate - Creates or updates the specified virtual network rule. During update, the virtual network rule with the specified name will be replaced with this new virtual network rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. virtualNetworkRuleName - The name of the virtual network rule to create or update. parameters - Parameters supplied to create or update the virtual network rule. options - VirtualNetworkRulesClientCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_CreateOrUpdate.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<virtual-network-rule-name>",
		armdatalakestore.CreateOrUpdateVirtualNetworkRuleParameters{
			Properties: &armdatalakestore.CreateOrUpdateVirtualNetworkRuleProperties{
				SubnetID: to.Ptr("<subnet-id>"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualNetworkRulesClient) Delete

func (client *VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientDeleteOptions) (VirtualNetworkRulesClientDeleteResponse, error)

Delete - Deletes the specified virtual network rule from the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. virtualNetworkRuleName - The name of the virtual network rule to delete. options - VirtualNetworkRulesClientDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<virtual-network-rule-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
}
Output:

func (*VirtualNetworkRulesClient) Get

func (client *VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientGetOptions) (VirtualNetworkRulesClientGetResponse, error)

Get - Gets the specified Data Lake Store virtual network rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. virtualNetworkRuleName - The name of the virtual network rule to retrieve. options - VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<virtual-network-rule-name>",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

func (*VirtualNetworkRulesClient) ListByAccount

ListByAccount - Lists the Data Lake Store virtual network rules within the specified Data Lake Store account. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. options - VirtualNetworkRulesClientListByAccountOptions contains the optional parameters for the VirtualNetworkRulesClient.ListByAccount method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_ListByAccount.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	pager := client.ListByAccount("<resource-group-name>",
		"<account-name>",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
			return
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*VirtualNetworkRulesClient) Update

func (client *VirtualNetworkRulesClient) Update(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientUpdateOptions) (VirtualNetworkRulesClientUpdateResponse, error)

Update - Updates the specified virtual network rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the Azure resource group. accountName - The name of the Data Lake Store account. virtualNetworkRuleName - The name of the virtual network rule to update. options - VirtualNetworkRulesClientUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/VirtualNetworkRules_Update.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/datalake-store/armdatalakestore"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
		return
	}
	ctx := context.Background()
	client, err := armdatalakestore.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
		return
	}
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<account-name>",
		"<virtual-network-rule-name>",
		&armdatalakestore.VirtualNetworkRulesClientUpdateOptions{Parameters: &armdatalakestore.UpdateVirtualNetworkRuleParameters{
			Properties: &armdatalakestore.UpdateVirtualNetworkRuleProperties{
				SubnetID: to.Ptr("<subnet-id>"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
		return
	}
	// TODO: use response item
	_ = res
}
Output:

type VirtualNetworkRulesClientCreateOrUpdateOptions added in v0.3.0

type VirtualNetworkRulesClientCreateOrUpdateOptions struct {
}

VirtualNetworkRulesClientCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.CreateOrUpdate method.

type VirtualNetworkRulesClientCreateOrUpdateResponse added in v0.3.0

type VirtualNetworkRulesClientCreateOrUpdateResponse struct {
	VirtualNetworkRule
}

VirtualNetworkRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkRulesClient.CreateOrUpdate.

type VirtualNetworkRulesClientDeleteOptions added in v0.3.0

type VirtualNetworkRulesClientDeleteOptions struct {
}

VirtualNetworkRulesClientDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.Delete method.

type VirtualNetworkRulesClientDeleteResponse added in v0.3.0

type VirtualNetworkRulesClientDeleteResponse struct {
}

VirtualNetworkRulesClientDeleteResponse contains the response from method VirtualNetworkRulesClient.Delete.

type VirtualNetworkRulesClientGetOptions added in v0.3.0

type VirtualNetworkRulesClientGetOptions struct {
}

VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.

type VirtualNetworkRulesClientGetResponse added in v0.3.0

type VirtualNetworkRulesClientGetResponse struct {
	VirtualNetworkRule
}

VirtualNetworkRulesClientGetResponse contains the response from method VirtualNetworkRulesClient.Get.

type VirtualNetworkRulesClientListByAccountOptions added in v0.3.0

type VirtualNetworkRulesClientListByAccountOptions struct {
}

VirtualNetworkRulesClientListByAccountOptions contains the optional parameters for the VirtualNetworkRulesClient.ListByAccount method.

type VirtualNetworkRulesClientListByAccountResponse added in v0.3.0

type VirtualNetworkRulesClientListByAccountResponse struct {
	VirtualNetworkRuleListResult
}

VirtualNetworkRulesClientListByAccountResponse contains the response from method VirtualNetworkRulesClient.ListByAccount.

type VirtualNetworkRulesClientUpdateOptions added in v0.3.0

type VirtualNetworkRulesClientUpdateOptions struct {
	// Parameters supplied to update the virtual network rule.
	Parameters *UpdateVirtualNetworkRuleParameters
}

VirtualNetworkRulesClientUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.Update method.

type VirtualNetworkRulesClientUpdateResponse added in v0.3.0

type VirtualNetworkRulesClientUpdateResponse struct {
	VirtualNetworkRule
}

VirtualNetworkRulesClientUpdateResponse contains the response from method VirtualNetworkRulesClient.Update.

Jump to

Keyboard shortcuts

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