armconfluent

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 14 Imported by: 4

README

Azure Confluent Module for Go

PkgGoDev

The armconfluent module provides operations for working with Azure Confluent.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Confluent module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Confluent. 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 Confluent 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 := armconfluent.NewMarketplaceAgreementsClient(<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{
    Host: arm.AzureChina,
}
client := armconfluent.NewMarketplaceAgreementsClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Confluent 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 AgreementProperties added in v0.2.0

type AgreementProperties struct {
	// If any version of the terms have been accepted, otherwise false.
	Accepted *bool `json:"accepted,omitempty"`

	// Link to HTML with Microsoft and Publisher terms.
	LicenseTextLink *string `json:"licenseTextLink,omitempty"`

	// Plan identifier string.
	Plan *string `json:"plan,omitempty"`

	// Link to the privacy policy of the publisher.
	PrivacyPolicyLink *string `json:"privacyPolicyLink,omitempty"`

	// Product identifier string.
	Product *string `json:"product,omitempty"`

	// Publisher identifier string.
	Publisher *string `json:"publisher,omitempty"`

	// Date and time in UTC of when the terms were accepted. This is empty if Accepted is false.
	RetrieveDatetime *time.Time `json:"retrieveDatetime,omitempty"`

	// Terms signature.
	Signature *string `json:"signature,omitempty"`
}

AgreementProperties - Terms properties for Marketplace and Confluent.

func (AgreementProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AgreementProperties.

func (*AgreementProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgreementProperties.

type AgreementResource added in v0.2.0

type AgreementResource struct {
	// Represents the properties of the resource.
	Properties *AgreementProperties `json:"properties,omitempty"`

	// READ-ONLY; The ARM id of the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

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

AgreementResource - Agreement Terms definition

type AgreementResourceListResponse added in v0.2.0

type AgreementResourceListResponse struct {
	// Link to the next set of results, if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Results of a list operation.
	Value []*AgreementResource `json:"value,omitempty"`
}

AgreementResourceListResponse - Response of a list operation.

func (AgreementResourceListResponse) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AgreementResourceListResponse.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

func (CreatedByType) ToPtr

func (c CreatedByType) ToPtr() *CreatedByType

ToPtr returns a *CreatedByType pointing to the current value.

type ErrorResponseBody

type ErrorResponseBody struct {
	// READ-ONLY; Error code
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Error detail
	Details []*ErrorResponseBody `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; Error message
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; Error target
	Target *string `json:"target,omitempty" azure:"ro"`
}

ErrorResponseBody - Response body of Error

func (ErrorResponseBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody.

type MarketplaceAgreementsClient

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

MarketplaceAgreementsClient contains the methods for the MarketplaceAgreements group. Don't use this type directly, use NewMarketplaceAgreementsClient() instead.

func NewMarketplaceAgreementsClient

func NewMarketplaceAgreementsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *MarketplaceAgreementsClient

NewMarketplaceAgreementsClient creates a new instance of MarketplaceAgreementsClient with the specified values. subscriptionID - Microsoft Azure subscription id credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*MarketplaceAgreementsClient) Create

Create - Create Confluent Marketplace agreement in the subscription. If the operation fails it returns an *azcore.ResponseError type. options - MarketplaceAgreementsClientCreateOptions contains the optional parameters for the MarketplaceAgreementsClient.Create method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/MarketplaceAgreements_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewMarketplaceAgreementsClient("<subscription-id>", cred, nil)
	res, err := client.Create(ctx,
		&armconfluent.MarketplaceAgreementsClientCreateOptions{Body: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.MarketplaceAgreementsClientCreateResult)
}
Output:

func (*MarketplaceAgreementsClient) List

List - List Confluent marketplace agreements in the subscription. If the operation fails it returns an *azcore.ResponseError type. options - MarketplaceAgreementsClientListOptions contains the optional parameters for the MarketplaceAgreementsClient.List method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/MarketplaceAgreements_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/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewMarketplaceAgreementsClient("<subscription-id>", cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type MarketplaceAgreementsClientCreateOptions added in v0.2.0

type MarketplaceAgreementsClientCreateOptions struct {
	// Confluent Marketplace Agreement resource
	Body *AgreementResource
}

MarketplaceAgreementsClientCreateOptions contains the optional parameters for the MarketplaceAgreementsClient.Create method.

type MarketplaceAgreementsClientCreateResponse added in v0.2.0

type MarketplaceAgreementsClientCreateResponse struct {
	MarketplaceAgreementsClientCreateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MarketplaceAgreementsClientCreateResponse contains the response from method MarketplaceAgreementsClient.Create.

type MarketplaceAgreementsClientCreateResult added in v0.2.0

type MarketplaceAgreementsClientCreateResult struct {
	AgreementResource
}

MarketplaceAgreementsClientCreateResult contains the result from method MarketplaceAgreementsClient.Create.

type MarketplaceAgreementsClientListOptions added in v0.2.0

type MarketplaceAgreementsClientListOptions struct {
}

MarketplaceAgreementsClientListOptions contains the optional parameters for the MarketplaceAgreementsClient.List method.

type MarketplaceAgreementsClientListPager added in v0.2.0

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

MarketplaceAgreementsClientListPager provides operations for iterating over paged responses.

func (*MarketplaceAgreementsClientListPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*MarketplaceAgreementsClientListPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*MarketplaceAgreementsClientListPager) PageResponse added in v0.2.0

PageResponse returns the current MarketplaceAgreementsClientListResponse page.

type MarketplaceAgreementsClientListResponse added in v0.2.0

type MarketplaceAgreementsClientListResponse struct {
	MarketplaceAgreementsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

MarketplaceAgreementsClientListResponse contains the response from method MarketplaceAgreementsClient.List.

type MarketplaceAgreementsClientListResult added in v0.2.0

type MarketplaceAgreementsClientListResult struct {
	AgreementResourceListResponse
}

MarketplaceAgreementsClientListResult contains the result from method MarketplaceAgreementsClient.List.

type OfferDetail

type OfferDetail struct {
	// REQUIRED; Offer Id
	ID *string `json:"id,omitempty"`

	// REQUIRED; Offer Plan Id
	PlanID *string `json:"planId,omitempty"`

	// REQUIRED; Offer Plan Name
	PlanName *string `json:"planName,omitempty"`

	// REQUIRED; Publisher Id
	PublisherID *string `json:"publisherId,omitempty"`

	// REQUIRED; Offer Plan Term unit
	TermUnit *string `json:"termUnit,omitempty"`

	// READ-ONLY; SaaS Offer Status
	Status *SaaSOfferStatus `json:"status,omitempty" azure:"ro"`
}

OfferDetail - Confluent Offer detail

type OperationDisplay

type OperationDisplay struct {
	// Description of the operation, e.g., 'Write confluent'.
	Description *string `json:"description,omitempty"`

	// Operation type, e.g., read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`

	// Service provider: Microsoft.Confluent
	Provider *string `json:"provider,omitempty"`

	// Type on which the operation is performed, e.g., 'clusters'.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - The object that represents the operation.

type OperationListResult

type OperationListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`

	// List of Confluent operations supported by the Microsoft.Confluent provider.
	Value []*OperationResult `json:"value,omitempty"`
}

OperationListResult - Result of GET request to list Confluent operations.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

type OperationResult

type OperationResult struct {
	// The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// Indicates whether the operation is a data action
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`
}

OperationResult - An Confluent REST API operation.

type OrganizationClient

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

OrganizationClient contains the methods for the Organization group. Don't use this type directly, use NewOrganizationClient() instead.

func NewOrganizationClient

func NewOrganizationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *OrganizationClient

NewOrganizationClient creates a new instance of OrganizationClient with the specified values. subscriptionID - Microsoft Azure subscription id credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OrganizationClient) BeginCreate

func (client *OrganizationClient) BeginCreate(ctx context.Context, resourceGroupName string, organizationName string, options *OrganizationClientBeginCreateOptions) (OrganizationClientCreatePollerResponse, error)

BeginCreate - Create Organization resource If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - Resource group name organizationName - Organization resource name options - OrganizationClientBeginCreateOptions contains the optional parameters for the OrganizationClient.BeginCreate method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_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/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewOrganizationClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreate(ctx,
		"<resource-group-name>",
		"<organization-name>",
		&armconfluent.OrganizationClientBeginCreateOptions{Body: &armconfluent.OrganizationResource{
			Location: to.StringPtr("<location>"),
			Properties: &armconfluent.OrganizationResourceProperties{
				OfferDetail: &armconfluent.OfferDetail{
					ID:          to.StringPtr("<id>"),
					PlanID:      to.StringPtr("<plan-id>"),
					PlanName:    to.StringPtr("<plan-name>"),
					PublisherID: to.StringPtr("<publisher-id>"),
					TermUnit:    to.StringPtr("<term-unit>"),
				},
				UserDetail: &armconfluent.UserDetail{
					EmailAddress: to.StringPtr("<email-address>"),
					FirstName:    to.StringPtr("<first-name>"),
					LastName:     to.StringPtr("<last-name>"),
				},
			},
			Tags: map[string]*string{
				"Environment": to.StringPtr("Dev"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OrganizationClientCreateResult)
}
Output:

func (*OrganizationClient) BeginDelete

func (client *OrganizationClient) BeginDelete(ctx context.Context, resourceGroupName string, organizationName string, options *OrganizationClientBeginDeleteOptions) (OrganizationClientDeletePollerResponse, error)

BeginDelete - Delete Organization resource If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - Resource group name organizationName - Organization resource name options - OrganizationClientBeginDeleteOptions contains the optional parameters for the OrganizationClient.BeginDelete method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_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/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewOrganizationClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<organization-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*OrganizationClient) Get

func (client *OrganizationClient) Get(ctx context.Context, resourceGroupName string, organizationName string, options *OrganizationClientGetOptions) (OrganizationClientGetResponse, error)

Get - Get the properties of a specific Organization resource. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - Resource group name organizationName - Organization resource name options - OrganizationClientGetOptions contains the optional parameters for the OrganizationClient.Get method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_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/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewOrganizationClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<organization-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OrganizationClientGetResult)
}
Output:

func (*OrganizationClient) ListByResourceGroup

ListByResourceGroup - List all Organizations under the specified resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - Resource group name options - OrganizationClientListByResourceGroupOptions contains the optional parameters for the OrganizationClient.ListByResourceGroup method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewOrganizationClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*OrganizationClient) ListBySubscription

ListBySubscription - List all organizations under the specified subscription. If the operation fails it returns an *azcore.ResponseError type. options - OrganizationClientListBySubscriptionOptions contains the optional parameters for the OrganizationClient.ListBySubscription method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewOrganizationClient("<subscription-id>", cred, nil)
	pager := client.ListBySubscription(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*OrganizationClient) Update

func (client *OrganizationClient) Update(ctx context.Context, resourceGroupName string, organizationName string, options *OrganizationClientUpdateOptions) (OrganizationClientUpdateResponse, error)

Update - Update Organization resource If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - Resource group name organizationName - Organization resource name options - OrganizationClientUpdateOptions contains the optional parameters for the OrganizationClient.Update method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Organization_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/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewOrganizationClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<organization-name>",
		&armconfluent.OrganizationClientUpdateOptions{Body: &armconfluent.OrganizationResourceUpdate{
			Tags: map[string]*string{
				"client": to.StringPtr("dev-client"),
				"env":    to.StringPtr("dev"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OrganizationClientUpdateResult)
}
Output:

type OrganizationClientBeginCreateOptions added in v0.2.0

type OrganizationClientBeginCreateOptions struct {
	// Organization resource model
	Body *OrganizationResource
}

OrganizationClientBeginCreateOptions contains the optional parameters for the OrganizationClient.BeginCreate method.

type OrganizationClientBeginDeleteOptions added in v0.2.0

type OrganizationClientBeginDeleteOptions struct {
}

OrganizationClientBeginDeleteOptions contains the optional parameters for the OrganizationClient.BeginDelete method.

type OrganizationClientCreatePoller added in v0.2.0

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

OrganizationClientCreatePoller provides polling facilities until the operation reaches a terminal state.

func (*OrganizationClientCreatePoller) Done added in v0.2.0

Done returns true if the LRO has reached a terminal state.

func (*OrganizationClientCreatePoller) FinalResponse added in v0.2.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final OrganizationClientCreateResponse will be returned.

func (*OrganizationClientCreatePoller) Poll added in v0.2.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*OrganizationClientCreatePoller) ResumeToken added in v0.2.0

func (p *OrganizationClientCreatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type OrganizationClientCreatePollerResponse added in v0.2.0

type OrganizationClientCreatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *OrganizationClientCreatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientCreatePollerResponse contains the response from method OrganizationClient.Create.

func (OrganizationClientCreatePollerResponse) PollUntilDone added in v0.2.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*OrganizationClientCreatePollerResponse) Resume added in v0.2.0

Resume rehydrates a OrganizationClientCreatePollerResponse from the provided client and resume token.

type OrganizationClientCreateResponse added in v0.2.0

type OrganizationClientCreateResponse struct {
	OrganizationClientCreateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientCreateResponse contains the response from method OrganizationClient.Create.

type OrganizationClientCreateResult added in v0.2.0

type OrganizationClientCreateResult struct {
	OrganizationResource
}

OrganizationClientCreateResult contains the result from method OrganizationClient.Create.

type OrganizationClientDeletePoller added in v0.2.0

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

OrganizationClientDeletePoller provides polling facilities until the operation reaches a terminal state.

func (*OrganizationClientDeletePoller) Done added in v0.2.0

Done returns true if the LRO has reached a terminal state.

func (*OrganizationClientDeletePoller) FinalResponse added in v0.2.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final OrganizationClientDeleteResponse will be returned.

func (*OrganizationClientDeletePoller) Poll added in v0.2.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*OrganizationClientDeletePoller) ResumeToken added in v0.2.0

func (p *OrganizationClientDeletePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type OrganizationClientDeletePollerResponse added in v0.2.0

type OrganizationClientDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *OrganizationClientDeletePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientDeletePollerResponse contains the response from method OrganizationClient.Delete.

func (OrganizationClientDeletePollerResponse) PollUntilDone added in v0.2.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*OrganizationClientDeletePollerResponse) Resume added in v0.2.0

Resume rehydrates a OrganizationClientDeletePollerResponse from the provided client and resume token.

type OrganizationClientDeleteResponse added in v0.2.0

type OrganizationClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientDeleteResponse contains the response from method OrganizationClient.Delete.

type OrganizationClientGetOptions added in v0.2.0

type OrganizationClientGetOptions struct {
}

OrganizationClientGetOptions contains the optional parameters for the OrganizationClient.Get method.

type OrganizationClientGetResponse added in v0.2.0

type OrganizationClientGetResponse struct {
	OrganizationClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientGetResponse contains the response from method OrganizationClient.Get.

type OrganizationClientGetResult added in v0.2.0

type OrganizationClientGetResult struct {
	OrganizationResource
}

OrganizationClientGetResult contains the result from method OrganizationClient.Get.

type OrganizationClientListByResourceGroupOptions added in v0.2.0

type OrganizationClientListByResourceGroupOptions struct {
}

OrganizationClientListByResourceGroupOptions contains the optional parameters for the OrganizationClient.ListByResourceGroup method.

type OrganizationClientListByResourceGroupPager added in v0.2.0

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

OrganizationClientListByResourceGroupPager provides operations for iterating over paged responses.

func (*OrganizationClientListByResourceGroupPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*OrganizationClientListByResourceGroupPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OrganizationClientListByResourceGroupPager) PageResponse added in v0.2.0

PageResponse returns the current OrganizationClientListByResourceGroupResponse page.

type OrganizationClientListByResourceGroupResponse added in v0.2.0

type OrganizationClientListByResourceGroupResponse struct {
	OrganizationClientListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientListByResourceGroupResponse contains the response from method OrganizationClient.ListByResourceGroup.

type OrganizationClientListByResourceGroupResult added in v0.2.0

type OrganizationClientListByResourceGroupResult struct {
	OrganizationResourceListResult
}

OrganizationClientListByResourceGroupResult contains the result from method OrganizationClient.ListByResourceGroup.

type OrganizationClientListBySubscriptionOptions added in v0.2.0

type OrganizationClientListBySubscriptionOptions struct {
}

OrganizationClientListBySubscriptionOptions contains the optional parameters for the OrganizationClient.ListBySubscription method.

type OrganizationClientListBySubscriptionPager added in v0.2.0

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

OrganizationClientListBySubscriptionPager provides operations for iterating over paged responses.

func (*OrganizationClientListBySubscriptionPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*OrganizationClientListBySubscriptionPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OrganizationClientListBySubscriptionPager) PageResponse added in v0.2.0

PageResponse returns the current OrganizationClientListBySubscriptionResponse page.

type OrganizationClientListBySubscriptionResponse added in v0.2.0

type OrganizationClientListBySubscriptionResponse struct {
	OrganizationClientListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientListBySubscriptionResponse contains the response from method OrganizationClient.ListBySubscription.

type OrganizationClientListBySubscriptionResult added in v0.2.0

type OrganizationClientListBySubscriptionResult struct {
	OrganizationResourceListResult
}

OrganizationClientListBySubscriptionResult contains the result from method OrganizationClient.ListBySubscription.

type OrganizationClientUpdateOptions added in v0.2.0

type OrganizationClientUpdateOptions struct {
	// Updated Organization resource
	Body *OrganizationResourceUpdate
}

OrganizationClientUpdateOptions contains the optional parameters for the OrganizationClient.Update method.

type OrganizationClientUpdateResponse added in v0.2.0

type OrganizationClientUpdateResponse struct {
	OrganizationClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationClientUpdateResponse contains the response from method OrganizationClient.Update.

type OrganizationClientUpdateResult added in v0.2.0

type OrganizationClientUpdateResult struct {
	OrganizationResource
}

OrganizationClientUpdateResult contains the result from method OrganizationClient.Update.

type OrganizationOperationsClient

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

OrganizationOperationsClient contains the methods for the OrganizationOperations group. Don't use this type directly, use NewOrganizationOperationsClient() instead.

func NewOrganizationOperationsClient

func NewOrganizationOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *OrganizationOperationsClient

NewOrganizationOperationsClient creates a new instance of OrganizationOperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OrganizationOperationsClient) List

List - List all operations provided by Microsoft.Confluent. If the operation fails it returns an *azcore.ResponseError type. options - OrganizationOperationsClientListOptions contains the optional parameters for the OrganizationOperationsClient.List method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/OrganizationOperations_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/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewOrganizationOperationsClient(cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type OrganizationOperationsClientListOptions added in v0.2.0

type OrganizationOperationsClientListOptions struct {
}

OrganizationOperationsClientListOptions contains the optional parameters for the OrganizationOperationsClient.List method.

type OrganizationOperationsClientListPager added in v0.2.0

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

OrganizationOperationsClientListPager provides operations for iterating over paged responses.

func (*OrganizationOperationsClientListPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*OrganizationOperationsClientListPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OrganizationOperationsClientListPager) PageResponse added in v0.2.0

PageResponse returns the current OrganizationOperationsClientListResponse page.

type OrganizationOperationsClientListResponse added in v0.2.0

type OrganizationOperationsClientListResponse struct {
	OrganizationOperationsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OrganizationOperationsClientListResponse contains the response from method OrganizationOperationsClient.List.

type OrganizationOperationsClientListResult added in v0.2.0

type OrganizationOperationsClientListResult struct {
	OperationListResult
}

OrganizationOperationsClientListResult contains the result from method OrganizationOperationsClient.List.

type OrganizationResource

type OrganizationResource struct {
	// REQUIRED; Organization resource properties
	Properties *OrganizationResourceProperties `json:"properties,omitempty"`

	// Location of Organization resource
	Location *string `json:"location,omitempty"`

	// Organization resource tags
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; The ARM id of the resource.
	ID *string `json:"id,omitempty" azure:"ro"`

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

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

OrganizationResource - Organization resource.

func (OrganizationResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResource.

type OrganizationResourceListResult

type OrganizationResourceListResult struct {
	// Link to the next set of results, if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Result of a list operation.
	Value []*OrganizationResource `json:"value,omitempty"`
}

OrganizationResourceListResult - The response of a list operation.

func (OrganizationResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResourceListResult.

type OrganizationResourceProperties

type OrganizationResourceProperties struct {
	// REQUIRED; Confluent offer detail
	OfferDetail *OfferDetail `json:"offerDetail,omitempty"`

	// REQUIRED; Subscriber detail
	UserDetail *UserDetail `json:"userDetail,omitempty"`

	// READ-ONLY; The creation time of the resource.
	CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"`

	// READ-ONLY; Id of the Confluent organization.
	OrganizationID *string `json:"organizationId,omitempty" azure:"ro"`

	// READ-ONLY; Provision states for confluent RP
	ProvisioningState *ProvisionState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; SSO url for the Confluent organization.
	SsoURL *string `json:"ssoUrl,omitempty" azure:"ro"`
}

OrganizationResourceProperties - Organization resource property

func (OrganizationResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResourceProperties.

func (*OrganizationResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationResourceProperties.

type OrganizationResourceUpdate

type OrganizationResourceUpdate struct {
	// ARM resource tags
	Tags map[string]*string `json:"tags,omitempty"`
}

OrganizationResourceUpdate - Organization Resource update

func (OrganizationResourceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OrganizationResourceUpdate.

type ProvisionState

type ProvisionState string

ProvisionState - Provision states for confluent RP

const (
	ProvisionStateAccepted     ProvisionState = "Accepted"
	ProvisionStateCanceled     ProvisionState = "Canceled"
	ProvisionStateCreating     ProvisionState = "Creating"
	ProvisionStateDeleted      ProvisionState = "Deleted"
	ProvisionStateDeleting     ProvisionState = "Deleting"
	ProvisionStateFailed       ProvisionState = "Failed"
	ProvisionStateNotSpecified ProvisionState = "NotSpecified"
	ProvisionStateSucceeded    ProvisionState = "Succeeded"
	ProvisionStateUpdating     ProvisionState = "Updating"
)

func PossibleProvisionStateValues

func PossibleProvisionStateValues() []ProvisionState

PossibleProvisionStateValues returns the possible values for the ProvisionState const type.

func (ProvisionState) ToPtr

func (c ProvisionState) ToPtr() *ProvisionState

ToPtr returns a *ProvisionState pointing to the current value.

type ResourceProviderDefaultErrorResponse

type ResourceProviderDefaultErrorResponse struct {
	// READ-ONLY; Response body of Error
	Error *ErrorResponseBody `json:"error,omitempty" azure:"ro"`
}

ResourceProviderDefaultErrorResponse - Default error response for resource provider

type SaaSOfferStatus

type SaaSOfferStatus string

SaaSOfferStatus - SaaS Offer Status for confluent RP

const (
	SaaSOfferStatusFailed                  SaaSOfferStatus = "Failed"
	SaaSOfferStatusInProgress              SaaSOfferStatus = "InProgress"
	SaaSOfferStatusPendingFulfillmentStart SaaSOfferStatus = "PendingFulfillmentStart"
	SaaSOfferStatusReinstated              SaaSOfferStatus = "Reinstated"
	SaaSOfferStatusStarted                 SaaSOfferStatus = "Started"
	SaaSOfferStatusSubscribed              SaaSOfferStatus = "Subscribed"
	SaaSOfferStatusSucceeded               SaaSOfferStatus = "Succeeded"
	SaaSOfferStatusSuspended               SaaSOfferStatus = "Suspended"
	SaaSOfferStatusUnsubscribed            SaaSOfferStatus = "Unsubscribed"
	SaaSOfferStatusUpdating                SaaSOfferStatus = "Updating"
)

func PossibleSaaSOfferStatusValues

func PossibleSaaSOfferStatusValues() []SaaSOfferStatus

PossibleSaaSOfferStatusValues returns the possible values for the SaaSOfferStatus const type.

func (SaaSOfferStatus) ToPtr

func (c SaaSOfferStatus) ToPtr() *SaaSOfferStatus

ToPtr returns a *SaaSOfferStatus pointing to the current value.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type UserDetail

type UserDetail struct {
	// REQUIRED; Email address
	EmailAddress *string `json:"emailAddress,omitempty"`

	// First name
	FirstName *string `json:"firstName,omitempty"`

	// Last name
	LastName *string `json:"lastName,omitempty"`
}

UserDetail - Subscriber detail

type ValidationsClient

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

ValidationsClient contains the methods for the Validations group. Don't use this type directly, use NewValidationsClient() instead.

func NewValidationsClient

func NewValidationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ValidationsClient

NewValidationsClient creates a new instance of ValidationsClient with the specified values. subscriptionID - Microsoft Azure subscription id credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ValidationsClient) ValidateOrganization

func (client *ValidationsClient) ValidateOrganization(ctx context.Context, resourceGroupName string, organizationName string, body OrganizationResource, options *ValidationsClientValidateOrganizationOptions) (ValidationsClientValidateOrganizationResponse, error)

ValidateOrganization - Organization Validate proxy resource If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - Resource group name organizationName - Organization resource name body - Organization resource model options - ValidationsClientValidateOrganizationOptions contains the optional parameters for the ValidationsClient.ValidateOrganization method.

Example

x-ms-original-file: specification/confluent/resource-manager/Microsoft.Confluent/preview/2021-09-01-preview/examples/Validations_ValidateOrganizations.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/confluent/armconfluent"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armconfluent.NewValidationsClient("<subscription-id>", cred, nil)
	res, err := client.ValidateOrganization(ctx,
		"<resource-group-name>",
		"<organization-name>",
		armconfluent.OrganizationResource{
			Location: to.StringPtr("<location>"),
			Properties: &armconfluent.OrganizationResourceProperties{
				OfferDetail: &armconfluent.OfferDetail{
					ID:          to.StringPtr("<id>"),
					PlanID:      to.StringPtr("<plan-id>"),
					PlanName:    to.StringPtr("<plan-name>"),
					PublisherID: to.StringPtr("<publisher-id>"),
					TermUnit:    to.StringPtr("<term-unit>"),
				},
				UserDetail: &armconfluent.UserDetail{
					EmailAddress: to.StringPtr("<email-address>"),
					FirstName:    to.StringPtr("<first-name>"),
					LastName:     to.StringPtr("<last-name>"),
				},
			},
			Tags: map[string]*string{
				"Environment": to.StringPtr("Dev"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ValidationsClientValidateOrganizationResult)
}
Output:

type ValidationsClientValidateOrganizationOptions added in v0.2.0

type ValidationsClientValidateOrganizationOptions struct {
}

ValidationsClientValidateOrganizationOptions contains the optional parameters for the ValidationsClient.ValidateOrganization method.

type ValidationsClientValidateOrganizationResponse added in v0.2.0

type ValidationsClientValidateOrganizationResponse struct {
	ValidationsClientValidateOrganizationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ValidationsClientValidateOrganizationResponse contains the response from method ValidationsClient.ValidateOrganization.

type ValidationsClientValidateOrganizationResult added in v0.2.0

type ValidationsClientValidateOrganizationResult struct {
	OrganizationResource
}

ValidationsClientValidateOrganizationResult contains the result from method ValidationsClient.ValidateOrganization.

Jump to

Keyboard shortcuts

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