armdatacatalog

package module
v1.2.0 Latest Latest
Warning

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

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

README

Azure Data Catalog Module for Go

PkgGoDev

The armdatacatalog module provides operations for working with Azure Data Catalog.

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Data Catalog module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datacatalog/armdatacatalog

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewADCCatalogsClient()

Fakes

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

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

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Data Catalog 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 ADCCatalog

type ADCCatalog struct {
	// Resource etag
	Etag *string

	// Resource location
	Location *string

	// Azure Data Catalog properties.
	Properties *ADCCatalogProperties

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

ADCCatalog - Azure Data Catalog.

func (ADCCatalog) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ADCCatalog.

func (*ADCCatalog) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ADCCatalog.

type ADCCatalogProperties

type ADCCatalogProperties struct {
	// Azure data catalog admin list.
	Admins []*Principals

	// Automatic unit adjustment enabled or not.
	EnableAutomaticUnitAdjustment *bool

	// Azure data catalog SKU.
	SKU *SKUType

	// Azure data catalog provision status.
	SuccessfullyProvisioned *bool

	// Azure data catalog units.
	Units *int32

	// Azure data catalog user list.
	Users []*Principals
}

ADCCatalogProperties - Properties of the data catalog.

func (ADCCatalogProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ADCCatalogProperties.

func (*ADCCatalogProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ADCCatalogProperties.

type ADCCatalogsClient

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

ADCCatalogsClient contains the methods for the ADCCatalogs group. Don't use this type directly, use NewADCCatalogsClient() instead.

func NewADCCatalogsClient

func NewADCCatalogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ADCCatalogsClient, error)

NewADCCatalogsClient creates a new instance of ADCCatalogsClient with the specified values.

  • subscriptionID - Gets subscription credentials which uniquely identify the 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 (*ADCCatalogsClient) BeginDelete

func (client *ADCCatalogsClient) BeginDelete(ctx context.Context, resourceGroupName string, catalogName string, options *ADCCatalogsClientBeginDeleteOptions) (*runtime.Poller[ADCCatalogsClientDeleteResponse], error)

BeginDelete - The Delete Azure Data Catalog Service operation deletes an existing data catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2016-03-30

  • resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive.
  • catalogName - The name of the data catalog in the specified subscription and resource group.
  • options - ADCCatalogsClientBeginDeleteOptions contains the optional parameters for the ADCCatalogsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datacatalog/resource-manager/Microsoft.DataCatalog/stable/2016-03-30/examples/DeleteADCCatalog.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datacatalog/armdatacatalog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatacatalog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewADCCatalogsClient().BeginDelete(ctx, "exampleResourceGroup", "exampleCatalog", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ADCCatalogsClient) CreateOrUpdate

func (client *ADCCatalogsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, catalogName string, properties ADCCatalog, options *ADCCatalogsClientCreateOrUpdateOptions) (ADCCatalogsClientCreateOrUpdateResponse, error)

CreateOrUpdate - The Create Azure Data Catalog service operation creates a new data catalog service with the specified parameters. If the specific service already exists, then any patchable properties will be updated and any immutable properties will remain unchanged. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2016-03-30

  • resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive.
  • catalogName - The name of the data catalog in the specified subscription and resource group.
  • properties - Properties supplied to the Create or Update a data catalog.
  • options - ADCCatalogsClientCreateOrUpdateOptions contains the optional parameters for the ADCCatalogsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datacatalog/resource-manager/Microsoft.DataCatalog/stable/2016-03-30/examples/CreateOrUpdateADCCatalog.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/datacatalog/armdatacatalog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatacatalog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewADCCatalogsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "exampleCatalog", armdatacatalog.ADCCatalog{
		Location: to.Ptr("North US"),
		Tags: map[string]*string{
			"mykey":  to.Ptr("myvalue"),
			"mykey2": to.Ptr("myvalue2"),
		},
		Properties: &armdatacatalog.ADCCatalogProperties{
			Admins: []*armdatacatalog.Principals{
				{
					ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
					Upn:      to.Ptr("myupn@microsoft.com"),
				}},
			EnableAutomaticUnitAdjustment: to.Ptr(false),
			SKU:                           to.Ptr(armdatacatalog.SKUTypeStandard),
			Units:                         to.Ptr[int32](1),
			Users: []*armdatacatalog.Principals{
				{
					ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
					Upn:      to.Ptr("myupn@microsoft.com"),
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ADCCatalog = armdatacatalog.ADCCatalog{
	// 	Name: to.Ptr("exampleCatalog"),
	// 	Type: to.Ptr("Microsoft.DataCatalog/catalogs"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataCatalog/catalogs/exampleCatalog"),
	// 	Location: to.Ptr("North US"),
	// 	Tags: map[string]*string{
	// 		"mykey": to.Ptr("myvalue"),
	// 		"mykey2": to.Ptr("myvalue2"),
	// 	},
	// 	Properties: &armdatacatalog.ADCCatalogProperties{
	// 		Admins: []*armdatacatalog.Principals{
	// 			{
	// 				ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 				Upn: to.Ptr("myupn@microsoft.com"),
	// 		}},
	// 		EnableAutomaticUnitAdjustment: to.Ptr(false),
	// 		SKU: to.Ptr(armdatacatalog.SKUTypeStandard),
	// 		SuccessfullyProvisioned: to.Ptr(true),
	// 		Units: to.Ptr[int32](1),
	// 		Users: []*armdatacatalog.Principals{
	// 			{
	// 				ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 				Upn: to.Ptr("myupn@microsoft.com"),
	// 		}},
	// 	},
	// }
}
Output:

func (*ADCCatalogsClient) Get

func (client *ADCCatalogsClient) Get(ctx context.Context, resourceGroupName string, catalogName string, options *ADCCatalogsClientGetOptions) (ADCCatalogsClientGetResponse, error)

Get - The Get Azure Data Catalog Service operation retrieves a json representation of the data catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2016-03-30

  • resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive.
  • catalogName - The name of the data catalog in the specified subscription and resource group.
  • options - ADCCatalogsClientGetOptions contains the optional parameters for the ADCCatalogsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datacatalog/resource-manager/Microsoft.DataCatalog/stable/2016-03-30/examples/GetADCCatalog.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datacatalog/armdatacatalog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatacatalog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewADCCatalogsClient().Get(ctx, "exampleResourceGroup", "exampleCatalog", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ADCCatalog = armdatacatalog.ADCCatalog{
	// 	Name: to.Ptr("exampleCatalog"),
	// 	Type: to.Ptr("Microsoft.DataCatalog/catalogs"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataCatalog/catalogs/exampleCatalog"),
	// 	Location: to.Ptr("North US"),
	// 	Tags: map[string]*string{
	// 		"mykey": to.Ptr("myvalue"),
	// 		"mykey2": to.Ptr("myvalue2"),
	// 	},
	// 	Properties: &armdatacatalog.ADCCatalogProperties{
	// 		Admins: []*armdatacatalog.Principals{
	// 			{
	// 				ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 				Upn: to.Ptr("myupn@microsoft.com"),
	// 		}},
	// 		EnableAutomaticUnitAdjustment: to.Ptr(false),
	// 		SKU: to.Ptr(armdatacatalog.SKUTypeStandard),
	// 		SuccessfullyProvisioned: to.Ptr(true),
	// 		Units: to.Ptr[int32](1),
	// 		Users: []*armdatacatalog.Principals{
	// 			{
	// 				ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 				Upn: to.Ptr("myupn@microsoft.com"),
	// 		}},
	// 	},
	// }
}
Output:

func (*ADCCatalogsClient) ListtByResourceGroup

ListtByResourceGroup - The List catalogs in Resource Group operation lists all the Azure Data Catalogs available under the given resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2016-03-30

  • resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive.
  • options - ADCCatalogsClientListtByResourceGroupOptions contains the optional parameters for the ADCCatalogsClient.ListtByResourceGroup method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datacatalog/resource-manager/Microsoft.DataCatalog/stable/2016-03-30/examples/ListADCCatalogsByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datacatalog/armdatacatalog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatacatalog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewADCCatalogsClient().ListtByResourceGroup(ctx, "exampleResourceGroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ADCCatalogsListResult = armdatacatalog.ADCCatalogsListResult{
	// 	Value: []*armdatacatalog.ADCCatalog{
	// 		{
	// 			Name: to.Ptr("exampleCatalog"),
	// 			Type: to.Ptr("Microsoft.DataCatalog/catalogs"),
	// 			ID: to.Ptr("/subscriptions/12345678-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataCatalog/catalogs/exampleCatalog"),
	// 			Location: to.Ptr("North US"),
	// 			Tags: map[string]*string{
	// 				"mykey": to.Ptr("myvalue"),
	// 				"mykey2": to.Ptr("myvalue2"),
	// 			},
	// 			Properties: &armdatacatalog.ADCCatalogProperties{
	// 				Admins: []*armdatacatalog.Principals{
	// 					{
	// 						ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 						Upn: to.Ptr("myupn@microsoft.com"),
	// 				}},
	// 				EnableAutomaticUnitAdjustment: to.Ptr(false),
	// 				SKU: to.Ptr(armdatacatalog.SKUTypeStandard),
	// 				SuccessfullyProvisioned: to.Ptr(true),
	// 				Units: to.Ptr[int32](1),
	// 				Users: []*armdatacatalog.Principals{
	// 					{
	// 						ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 						Upn: to.Ptr("myupn@microsoft.com"),
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

func (*ADCCatalogsClient) Update

func (client *ADCCatalogsClient) Update(ctx context.Context, resourceGroupName string, catalogName string, properties ADCCatalog, options *ADCCatalogsClientUpdateOptions) (ADCCatalogsClientUpdateResponse, error)

Update - The Update Azure Data Catalog Service operation can be used to update the existing deployment. The update call only supports the properties listed in the PATCH body. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2016-03-30

  • resourceGroupName - The name of the resource group within the user's subscription. The name is case insensitive.
  • catalogName - The name of the data catalog in the specified subscription and resource group.
  • properties - Properties supplied to the Update a data catalog.
  • options - ADCCatalogsClientUpdateOptions contains the optional parameters for the ADCCatalogsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datacatalog/resource-manager/Microsoft.DataCatalog/stable/2016-03-30/examples/UpdateADCCatalog.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/datacatalog/armdatacatalog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatacatalog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewADCCatalogsClient().Update(ctx, "exampleResourceGroup", "exampleCatalog", armdatacatalog.ADCCatalog{
		Location: to.Ptr("North US"),
		Tags: map[string]*string{
			"mykey":  to.Ptr("myvalue"),
			"mykey2": to.Ptr("myvalue2"),
		},
		Properties: &armdatacatalog.ADCCatalogProperties{
			Admins: []*armdatacatalog.Principals{
				{
					ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
					Upn:      to.Ptr("myupn@microsoft.com"),
				}},
			EnableAutomaticUnitAdjustment: to.Ptr(false),
			SKU:                           to.Ptr(armdatacatalog.SKUTypeStandard),
			Units:                         to.Ptr[int32](1),
			Users: []*armdatacatalog.Principals{
				{
					ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
					Upn:      to.Ptr("myupn@microsoft.com"),
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ADCCatalog = armdatacatalog.ADCCatalog{
	// 	Name: to.Ptr("exampleCatalog"),
	// 	Type: to.Ptr("Microsoft.DataCatalog/catalogs"),
	// 	ID: to.Ptr("/subscriptions/12345678-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataCatalog/catalogs/exampleCatalog"),
	// 	Location: to.Ptr("North US"),
	// 	Tags: map[string]*string{
	// 		"mykey": to.Ptr("myvalue"),
	// 		"mykey2": to.Ptr("myvalue2"),
	// 	},
	// 	Properties: &armdatacatalog.ADCCatalogProperties{
	// 		Admins: []*armdatacatalog.Principals{
	// 			{
	// 				ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 				Upn: to.Ptr("myupn@microsoft.com"),
	// 		}},
	// 		EnableAutomaticUnitAdjustment: to.Ptr(false),
	// 		SKU: to.Ptr(armdatacatalog.SKUTypeStandard),
	// 		SuccessfullyProvisioned: to.Ptr(true),
	// 		Units: to.Ptr[int32](1),
	// 		Users: []*armdatacatalog.Principals{
	// 			{
	// 				ObjectID: to.Ptr("99999999-9999-9999-999999999999"),
	// 				Upn: to.Ptr("myupn@microsoft.com"),
	// 		}},
	// 	},
	// }
}
Output:

type ADCCatalogsClientBeginDeleteOptions added in v0.2.0

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

ADCCatalogsClientBeginDeleteOptions contains the optional parameters for the ADCCatalogsClient.BeginDelete method.

type ADCCatalogsClientCreateOrUpdateOptions added in v0.2.0

type ADCCatalogsClientCreateOrUpdateOptions struct {
}

ADCCatalogsClientCreateOrUpdateOptions contains the optional parameters for the ADCCatalogsClient.CreateOrUpdate method.

type ADCCatalogsClientCreateOrUpdateResponse added in v0.2.0

type ADCCatalogsClientCreateOrUpdateResponse struct {
	// Azure Data Catalog.
	ADCCatalog
}

ADCCatalogsClientCreateOrUpdateResponse contains the response from method ADCCatalogsClient.CreateOrUpdate.

type ADCCatalogsClientDeleteResponse added in v0.2.0

type ADCCatalogsClientDeleteResponse struct {
}

ADCCatalogsClientDeleteResponse contains the response from method ADCCatalogsClient.BeginDelete.

type ADCCatalogsClientGetOptions added in v0.2.0

type ADCCatalogsClientGetOptions struct {
}

ADCCatalogsClientGetOptions contains the optional parameters for the ADCCatalogsClient.Get method.

type ADCCatalogsClientGetResponse added in v0.2.0

type ADCCatalogsClientGetResponse struct {
	// Azure Data Catalog.
	ADCCatalog
}

ADCCatalogsClientGetResponse contains the response from method ADCCatalogsClient.Get.

type ADCCatalogsClientListtByResourceGroupOptions added in v0.2.0

type ADCCatalogsClientListtByResourceGroupOptions struct {
}

ADCCatalogsClientListtByResourceGroupOptions contains the optional parameters for the ADCCatalogsClient.ListtByResourceGroup method.

type ADCCatalogsClientListtByResourceGroupResponse added in v0.2.0

type ADCCatalogsClientListtByResourceGroupResponse struct {
	// The response from the List Azure Data Catalog operation.
	ADCCatalogsListResult
}

ADCCatalogsClientListtByResourceGroupResponse contains the response from method ADCCatalogsClient.ListtByResourceGroup.

type ADCCatalogsClientUpdateOptions added in v0.2.0

type ADCCatalogsClientUpdateOptions struct {
}

ADCCatalogsClientUpdateOptions contains the optional parameters for the ADCCatalogsClient.Update method.

type ADCCatalogsClientUpdateResponse added in v0.2.0

type ADCCatalogsClientUpdateResponse struct {
	// Azure Data Catalog.
	ADCCatalog
}

ADCCatalogsClientUpdateResponse contains the response from method ADCCatalogsClient.Update.

type ADCCatalogsListResult

type ADCCatalogsListResult struct {
	// the list of Azure Data Catalogs.
	Value []*ADCCatalog
}

ADCCatalogsListResult - The response from the List Azure Data Catalog operation.

func (ADCCatalogsListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ADCCatalogsListResult.

func (*ADCCatalogsListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ADCCatalogsListResult.

type ADCOperationsClient

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

ADCOperationsClient contains the methods for the ADCOperations group. Don't use this type directly, use NewADCOperationsClient() instead.

func NewADCOperationsClient

func NewADCOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ADCOperationsClient, error)

NewADCOperationsClient creates a new instance of ADCOperationsClient with the specified values.

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

func (*ADCOperationsClient) List

List - Lists all the available Azure Data Catalog service operations. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2016-03-30

  • options - ADCOperationsClientListOptions contains the optional parameters for the ADCOperationsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/datacatalog/resource-manager/Microsoft.DataCatalog/stable/2016-03-30/examples/GetOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datacatalog/armdatacatalog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatacatalog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewADCOperationsClient().List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperationEntityListResult = armdatacatalog.OperationEntityListResult{
	// 	Value: []*armdatacatalog.OperationEntity{
	// 		{
	// 			Name: to.Ptr("Microsoft.DataCatalog/catalogs/read"),
	// 			Display: &armdatacatalog.OperationDisplayInfo{
	// 				Description: to.Ptr("Get properties for catalog or catalogs under subscription or resource group."),
	// 				Operation: to.Ptr("Catalog Read Or List"),
	// 				Provider: to.Ptr("Microsoft Data Catalog"),
	// 				Resource: to.Ptr("Catalog"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DataCatalog/catalogs/write"),
	// 			Display: &armdatacatalog.OperationDisplayInfo{
	// 				Description: to.Ptr("Creates catalog or updates the tags and properties for the catalog."),
	// 				Operation: to.Ptr("Create Or Update Catalog"),
	// 				Provider: to.Ptr("Microsoft Data Catalog"),
	// 				Resource: to.Ptr("Catalog"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DataCatalog/catalogs/delete"),
	// 			Display: &armdatacatalog.OperationDisplayInfo{
	// 				Description: to.Ptr("Deletes the catalog."),
	// 				Operation: to.Ptr("Delete Catalog"),
	// 				Provider: to.Ptr("Microsoft Data Catalog"),
	// 				Resource: to.Ptr("Catalog"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.DataCatalog/operations/read"),
	// 			Display: &armdatacatalog.OperationDisplayInfo{
	// 				Description: to.Ptr("Lists operations available on Microsoft.DataCatalog resource provider."),
	// 				Operation: to.Ptr("List Available Catalog Operations"),
	// 				Provider: to.Ptr("Microsoft Data Catalog"),
	// 				Resource: to.Ptr("Available Catalog Operations"),
	// 			},
	// 	}},
	// }
}
Output:

type ADCOperationsClientListOptions added in v0.2.0

type ADCOperationsClientListOptions struct {
}

ADCOperationsClientListOptions contains the optional parameters for the ADCOperationsClient.List method.

type ADCOperationsClientListResponse added in v0.2.0

type ADCOperationsClientListResponse struct {
	// The list of Azure data catalog service operation response.
	OperationEntityListResult
}

ADCOperationsClientListResponse contains the response from method ADCOperationsClient.List.

type ClientFactory added in v1.1.0

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

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

func NewClientFactory added in v1.1.0

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

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

  • subscriptionID - Gets subscription credentials which uniquely identify the 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 (*ClientFactory) NewADCCatalogsClient added in v1.1.0

func (c *ClientFactory) NewADCCatalogsClient() *ADCCatalogsClient

NewADCCatalogsClient creates a new instance of ADCCatalogsClient.

func (*ClientFactory) NewADCOperationsClient added in v1.1.0

func (c *ClientFactory) NewADCOperationsClient() *ADCOperationsClient

NewADCOperationsClient creates a new instance of ADCOperationsClient.

type OperationDisplayInfo

type OperationDisplayInfo struct {
	// The description of the operation.
	Description *string

	// The action that users can perform, based on their permission level.
	Operation *string

	// Service provider: Azure Data Catalog Service.
	Provider *string

	// Resource on which the operation is performed.
	Resource *string
}

OperationDisplayInfo - The operation supported by Azure Data Catalog Service.

func (OperationDisplayInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplayInfo.

func (*OperationDisplayInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplayInfo.

type OperationEntity

type OperationEntity struct {
	// The operation supported by Azure Data Catalog Service.
	Display *OperationDisplayInfo

	// Operation name: {provider}/{resource}/{operation}.
	Name *string
}

OperationEntity - The operation supported by Azure Data Catalog Service.

func (OperationEntity) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationEntity.

func (*OperationEntity) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntity.

type OperationEntityListResult

type OperationEntityListResult struct {
	// The list of operations.
	Value []*OperationEntity
}

OperationEntityListResult - The list of Azure data catalog service operation response.

func (OperationEntityListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationEntityListResult.

func (*OperationEntityListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntityListResult.

type Principals

type Principals struct {
	// Object Id for the user
	ObjectID *string

	// UPN of the user.
	Upn *string
}

Principals - User principals.

func (Principals) MarshalJSON added in v1.1.0

func (p Principals) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Principals.

func (*Principals) UnmarshalJSON added in v1.1.0

func (p *Principals) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Principals.

type Resource

type Resource struct {
	// Resource etag
	Etag *string

	// Resource location
	Location *string

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Resource Id
	ID *string

	// READ-ONLY; Resource name
	Name *string

	// READ-ONLY; Resource type
	Type *string
}

Resource - The Resource model definition.

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type SKUType

type SKUType string

SKUType - Azure data catalog SKU.

const (
	SKUTypeFree     SKUType = "Free"
	SKUTypeStandard SKUType = "Standard"
)

func PossibleSKUTypeValues

func PossibleSKUTypeValues() []SKUType

PossibleSKUTypeValues returns the possible values for the SKUType const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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