armblockchain

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 14 Imported by: 2

README

Azure Blockchain Module for Go

PkgGoDev

The armblockchain module provides operations for working with Azure Blockchain.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Blockchain module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blockchain/armblockchain

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Blockchain. 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 Blockchain 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 := armblockchain.NewBlockchainMemberOperationResultsClient(<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 := armblockchain.NewBlockchainMemberOperationResultsClient(<subscription ID>, cred, &options)

Provide Feedback

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

type APIKey struct {
	// Gets or sets the API key name.
	KeyName *string `json:"keyName,omitempty"`

	// Gets or sets the API key value.
	Value *string `json:"value,omitempty"`
}

APIKey - API key payload which is exposed in the request/response of the resource provider.

type APIKeyCollection

type APIKeyCollection struct {
	// Gets or sets the collection of API key.
	Keys []*APIKey `json:"keys,omitempty"`
}

APIKeyCollection - Collection of the API key payload which is exposed in the response of the resource provider.

func (APIKeyCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIKeyCollection.

type BlockchainMember

type BlockchainMember struct {
	TrackedResource
	// Gets or sets the blockchain member properties.
	Properties *BlockchainMemberProperties `json:"properties,omitempty"`

	// Gets or sets the blockchain member Sku.
	SKU *SKU `json:"sku,omitempty"`
}

BlockchainMember - Payload of the blockchain member which is exposed in the request/response of the resource provider.

func (BlockchainMember) MarshalJSON

func (b BlockchainMember) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BlockchainMember.

type BlockchainMemberCollection

type BlockchainMemberCollection struct {
	// Gets or sets the URL, that the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string `json:"nextLink,omitempty"`

	// Gets or sets the collection of blockchain members.
	Value []*BlockchainMember `json:"value,omitempty"`
}

BlockchainMemberCollection - Collection of the blockchain member payload which is exposed in the request/response of the resource provider.

func (BlockchainMemberCollection) MarshalJSON

func (b BlockchainMemberCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BlockchainMemberCollection.

type BlockchainMemberNodesSKU

type BlockchainMemberNodesSKU struct {
	// Gets or sets the nodes capacity.
	Capacity *int32 `json:"capacity,omitempty"`
}

BlockchainMemberNodesSKU - Payload of the blockchain member nodes Sku for a blockchain member.

type BlockchainMemberOperationResultsClient

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

BlockchainMemberOperationResultsClient contains the methods for the BlockchainMemberOperationResults group. Don't use this type directly, use NewBlockchainMemberOperationResultsClient() instead.

func NewBlockchainMemberOperationResultsClient

func NewBlockchainMemberOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BlockchainMemberOperationResultsClient

NewBlockchainMemberOperationResultsClient creates a new instance of BlockchainMemberOperationResultsClient with the specified values.

func (*BlockchainMemberOperationResultsClient) Get

Get - Get Async operation result. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMemberOperationResults_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMemberOperationResultsClient("<subscription-id>", cred, nil)
	_, err = client.Get(ctx,
		"<location-name>",
		"<operation-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type BlockchainMemberOperationResultsGetOptions

type BlockchainMemberOperationResultsGetOptions struct {
}

BlockchainMemberOperationResultsGetOptions contains the optional parameters for the BlockchainMemberOperationResults.Get method.

type BlockchainMemberOperationResultsGetResponse

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

BlockchainMemberOperationResultsGetResponse contains the response from method BlockchainMemberOperationResults.Get.

type BlockchainMemberOperationResultsGetResult

type BlockchainMemberOperationResultsGetResult struct {
	OperationResult
}

BlockchainMemberOperationResultsGetResult contains the result from method BlockchainMemberOperationResults.Get.

type BlockchainMemberProperties

type BlockchainMemberProperties struct {
	// Gets or sets the consortium for the blockchain member.
	Consortium *string `json:"consortium,omitempty"`

	// Sets the managed consortium management account password.
	ConsortiumManagementAccountPassword *string `json:"consortiumManagementAccountPassword,omitempty"`

	// Gets the display name of the member in the consortium.
	ConsortiumMemberDisplayName *string `json:"consortiumMemberDisplayName,omitempty"`

	// Gets the role of the member in the consortium.
	ConsortiumRole *string `json:"consortiumRole,omitempty"`

	// Gets or sets firewall rules
	FirewallRules []*FirewallRule `json:"firewallRules,omitempty"`

	// Sets the basic auth password of the blockchain member.
	Password *string `json:"password,omitempty"`

	// Gets or sets the blockchain protocol.
	Protocol *BlockchainProtocol `json:"protocol,omitempty"`

	// Gets or sets the blockchain validator nodes Sku.
	ValidatorNodesSKU *BlockchainMemberNodesSKU `json:"validatorNodesSku,omitempty"`

	// READ-ONLY; Gets the managed consortium management account address.
	ConsortiumManagementAccountAddress *string `json:"consortiumManagementAccountAddress,omitempty" azure:"ro"`

	// READ-ONLY; Gets the dns endpoint of the blockchain member.
	DNS *string `json:"dns,omitempty" azure:"ro"`

	// READ-ONLY; Gets or sets the blockchain member provision state.
	ProvisioningState *BlockchainMemberProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Gets the public key of the blockchain member (default transaction node).
	PublicKey *string `json:"publicKey,omitempty" azure:"ro"`

	// READ-ONLY; Gets the Ethereum root contract address of the blockchain.
	RootContractAddress *string `json:"rootContractAddress,omitempty" azure:"ro"`

	// READ-ONLY; Gets the auth user name of the blockchain member.
	UserName *string `json:"userName,omitempty" azure:"ro"`
}

BlockchainMemberProperties - Payload of the blockchain member properties for a blockchain member.

func (BlockchainMemberProperties) MarshalJSON

func (b BlockchainMemberProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BlockchainMemberProperties.

type BlockchainMemberPropertiesUpdate

type BlockchainMemberPropertiesUpdate struct {
	TransactionNodePropertiesUpdate
	// Sets the managed consortium management account password.
	ConsortiumManagementAccountPassword *string `json:"consortiumManagementAccountPassword,omitempty"`
}

BlockchainMemberPropertiesUpdate - Update the payload of the blockchain member properties for a blockchain member.

func (BlockchainMemberPropertiesUpdate) MarshalJSON

func (b BlockchainMemberPropertiesUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BlockchainMemberPropertiesUpdate.

type BlockchainMemberProvisioningState

type BlockchainMemberProvisioningState string

BlockchainMemberProvisioningState - Gets or sets the blockchain member provision state.

const (
	BlockchainMemberProvisioningStateDeleting     BlockchainMemberProvisioningState = "Deleting"
	BlockchainMemberProvisioningStateFailed       BlockchainMemberProvisioningState = "Failed"
	BlockchainMemberProvisioningStateNotSpecified BlockchainMemberProvisioningState = "NotSpecified"
	BlockchainMemberProvisioningStateStale        BlockchainMemberProvisioningState = "Stale"
	BlockchainMemberProvisioningStateSucceeded    BlockchainMemberProvisioningState = "Succeeded"
	BlockchainMemberProvisioningStateUpdating     BlockchainMemberProvisioningState = "Updating"
)

func PossibleBlockchainMemberProvisioningStateValues

func PossibleBlockchainMemberProvisioningStateValues() []BlockchainMemberProvisioningState

PossibleBlockchainMemberProvisioningStateValues returns the possible values for the BlockchainMemberProvisioningState const type.

func (BlockchainMemberProvisioningState) ToPtr

ToPtr returns a *BlockchainMemberProvisioningState pointing to the current value.

type BlockchainMemberUpdate

type BlockchainMemberUpdate struct {
	// Gets or sets the blockchain member update properties.
	Properties *BlockchainMemberPropertiesUpdate `json:"properties,omitempty"`

	// Tags of the service which is a list of key value pairs that describes the resource.
	Tags map[string]*string `json:"tags,omitempty"`
}

BlockchainMemberUpdate - Update the payload of the blockchain member which is exposed in the request/response of the resource provider.

func (BlockchainMemberUpdate) MarshalJSON

func (b BlockchainMemberUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BlockchainMemberUpdate.

type BlockchainMembersBeginCreateOptions

type BlockchainMembersBeginCreateOptions struct {
	// Payload to create a blockchain member.
	BlockchainMember *BlockchainMember
}

BlockchainMembersBeginCreateOptions contains the optional parameters for the BlockchainMembers.BeginCreate method.

type BlockchainMembersBeginDeleteOptions

type BlockchainMembersBeginDeleteOptions struct {
}

BlockchainMembersBeginDeleteOptions contains the optional parameters for the BlockchainMembers.BeginDelete method.

type BlockchainMembersClient

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

BlockchainMembersClient contains the methods for the BlockchainMembers group. Don't use this type directly, use NewBlockchainMembersClient() instead.

func NewBlockchainMembersClient

func NewBlockchainMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BlockchainMembersClient

NewBlockchainMembersClient creates a new instance of BlockchainMembersClient with the specified values.

func (*BlockchainMembersClient) BeginCreate

func (client *BlockchainMembersClient) BeginCreate(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *BlockchainMembersBeginCreateOptions) (BlockchainMembersCreatePollerResponse, error)

BeginCreate - Create a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreate(ctx,
		"<blockchain-member-name>",
		"<resource-group-name>",
		&armblockchain.BlockchainMembersBeginCreateOptions{BlockchainMember: &armblockchain.BlockchainMember{
			TrackedResource: armblockchain.TrackedResource{
				Location: to.StringPtr("<location>"),
			},
			Properties: &armblockchain.BlockchainMemberProperties{
				Consortium:                          to.StringPtr("<consortium>"),
				ConsortiumManagementAccountPassword: to.StringPtr("<consortium-management-account-password>"),
				Password:                            to.StringPtr("<password>"),
				ValidatorNodesSKU: &armblockchain.BlockchainMemberNodesSKU{
					Capacity: to.Int32Ptr(2),
				},
				Protocol: armblockchain.BlockchainProtocolQuorum.ToPtr(),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("BlockchainMember.ID: %s\n", *res.ID)
}
Output:

func (*BlockchainMembersClient) BeginDelete

func (client *BlockchainMembersClient) BeginDelete(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *BlockchainMembersBeginDeleteOptions) (BlockchainMembersDeletePollerResponse, error)

BeginDelete - Delete a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_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/blockchain/armblockchain"
)

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

func (*BlockchainMembersClient) Get

func (client *BlockchainMembersClient) Get(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *BlockchainMembersGetOptions) (BlockchainMembersGetResponse, error)

Get - Get details about a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<blockchain-member-name>",
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("BlockchainMember.ID: %s\n", *res.ID)
}
Output:

func (*BlockchainMembersClient) List

List - Lists the blockchain members for a resource group. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("BlockchainMember.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*BlockchainMembersClient) ListAPIKeys

func (client *BlockchainMembersClient) ListAPIKeys(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *BlockchainMembersListAPIKeysOptions) (BlockchainMembersListAPIKeysResponse, error)

ListAPIKeys - Lists the API keys for a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_ListApiKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	_, err = client.ListAPIKeys(ctx,
		"<blockchain-member-name>",
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*BlockchainMembersClient) ListAll

ListAll - Lists the blockchain members for a subscription. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_ListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	pager := client.ListAll(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("BlockchainMember.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*BlockchainMembersClient) ListConsortiumMembers

func (client *BlockchainMembersClient) ListConsortiumMembers(blockchainMemberName string, resourceGroupName string, options *BlockchainMembersListConsortiumMembersOptions) *BlockchainMembersListConsortiumMembersPager

ListConsortiumMembers - Lists the consortium members for a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_ListConsortiumMembers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	pager := client.ListConsortiumMembers("<blockchain-member-name>",
		"<resource-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
	}
}
Output:

func (*BlockchainMembersClient) ListRegenerateAPIKeys

func (client *BlockchainMembersClient) ListRegenerateAPIKeys(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *BlockchainMembersListRegenerateAPIKeysOptions) (BlockchainMembersListRegenerateAPIKeysResponse, error)

ListRegenerateAPIKeys - Regenerate the API keys for a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_ListRegenerateApiKeys.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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	_, err = client.ListRegenerateAPIKeys(ctx,
		"<blockchain-member-name>",
		"<resource-group-name>",
		&armblockchain.BlockchainMembersListRegenerateAPIKeysOptions{APIKey: &armblockchain.APIKey{
			KeyName: to.StringPtr("<key-name>"),
		},
		})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*BlockchainMembersClient) Update

func (client *BlockchainMembersClient) Update(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *BlockchainMembersUpdateOptions) (BlockchainMembersUpdateResponse, error)

Update - Update a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewBlockchainMembersClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<blockchain-member-name>",
		"<resource-group-name>",
		&armblockchain.BlockchainMembersUpdateOptions{BlockchainMember: &armblockchain.BlockchainMemberUpdate{
			Properties: &armblockchain.BlockchainMemberPropertiesUpdate{
				TransactionNodePropertiesUpdate: armblockchain.TransactionNodePropertiesUpdate{
					FirewallRules: []*armblockchain.FirewallRule{},
					Password:      to.StringPtr("<password>"),
				},
				ConsortiumManagementAccountPassword: to.StringPtr("<consortium-management-account-password>"),
			},
			Tags: map[string]*string{},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("BlockchainMember.ID: %s\n", *res.ID)
}
Output:

type BlockchainMembersCreatePoller

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

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

func (*BlockchainMembersCreatePoller) Done

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

func (*BlockchainMembersCreatePoller) FinalResponse

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 BlockchainMembersCreateResponse will be returned.

func (*BlockchainMembersCreatePoller) Poll

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 (*BlockchainMembersCreatePoller) ResumeToken

func (p *BlockchainMembersCreatePoller) 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 BlockchainMembersCreatePollerResponse

type BlockchainMembersCreatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *BlockchainMembersCreatePoller

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

BlockchainMembersCreatePollerResponse contains the response from method BlockchainMembers.Create.

func (BlockchainMembersCreatePollerResponse) PollUntilDone

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 (*BlockchainMembersCreatePollerResponse) Resume

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

type BlockchainMembersCreateResponse

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

BlockchainMembersCreateResponse contains the response from method BlockchainMembers.Create.

type BlockchainMembersCreateResult

type BlockchainMembersCreateResult struct {
	BlockchainMember
}

BlockchainMembersCreateResult contains the result from method BlockchainMembers.Create.

type BlockchainMembersDeletePoller

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

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

func (*BlockchainMembersDeletePoller) Done

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

func (*BlockchainMembersDeletePoller) FinalResponse

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 BlockchainMembersDeleteResponse will be returned.

func (*BlockchainMembersDeletePoller) Poll

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 (*BlockchainMembersDeletePoller) ResumeToken

func (p *BlockchainMembersDeletePoller) 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 BlockchainMembersDeletePollerResponse

type BlockchainMembersDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *BlockchainMembersDeletePoller

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

BlockchainMembersDeletePollerResponse contains the response from method BlockchainMembers.Delete.

func (BlockchainMembersDeletePollerResponse) PollUntilDone

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 (*BlockchainMembersDeletePollerResponse) Resume

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

type BlockchainMembersDeleteResponse

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

BlockchainMembersDeleteResponse contains the response from method BlockchainMembers.Delete.

type BlockchainMembersGetOptions

type BlockchainMembersGetOptions struct {
}

BlockchainMembersGetOptions contains the optional parameters for the BlockchainMembers.Get method.

type BlockchainMembersGetResponse

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

BlockchainMembersGetResponse contains the response from method BlockchainMembers.Get.

type BlockchainMembersGetResult

type BlockchainMembersGetResult struct {
	BlockchainMember
}

BlockchainMembersGetResult contains the result from method BlockchainMembers.Get.

type BlockchainMembersListAPIKeysOptions

type BlockchainMembersListAPIKeysOptions struct {
}

BlockchainMembersListAPIKeysOptions contains the optional parameters for the BlockchainMembers.ListAPIKeys method.

type BlockchainMembersListAPIKeysResponse

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

BlockchainMembersListAPIKeysResponse contains the response from method BlockchainMembers.ListAPIKeys.

type BlockchainMembersListAPIKeysResult

type BlockchainMembersListAPIKeysResult struct {
	APIKeyCollection
}

BlockchainMembersListAPIKeysResult contains the result from method BlockchainMembers.ListAPIKeys.

type BlockchainMembersListAllOptions

type BlockchainMembersListAllOptions struct {
}

BlockchainMembersListAllOptions contains the optional parameters for the BlockchainMembers.ListAll method.

type BlockchainMembersListAllPager

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

BlockchainMembersListAllPager provides operations for iterating over paged responses.

func (*BlockchainMembersListAllPager) Err

Err returns the last error encountered while paging.

func (*BlockchainMembersListAllPager) NextPage

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

func (*BlockchainMembersListAllPager) PageResponse

PageResponse returns the current BlockchainMembersListAllResponse page.

type BlockchainMembersListAllResponse

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

BlockchainMembersListAllResponse contains the response from method BlockchainMembers.ListAll.

type BlockchainMembersListAllResult

type BlockchainMembersListAllResult struct {
	BlockchainMemberCollection
}

BlockchainMembersListAllResult contains the result from method BlockchainMembers.ListAll.

type BlockchainMembersListConsortiumMembersOptions

type BlockchainMembersListConsortiumMembersOptions struct {
}

BlockchainMembersListConsortiumMembersOptions contains the optional parameters for the BlockchainMembers.ListConsortiumMembers method.

type BlockchainMembersListConsortiumMembersPager

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

BlockchainMembersListConsortiumMembersPager provides operations for iterating over paged responses.

func (*BlockchainMembersListConsortiumMembersPager) Err

Err returns the last error encountered while paging.

func (*BlockchainMembersListConsortiumMembersPager) NextPage

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

func (*BlockchainMembersListConsortiumMembersPager) PageResponse

PageResponse returns the current BlockchainMembersListConsortiumMembersResponse page.

type BlockchainMembersListConsortiumMembersResponse

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

BlockchainMembersListConsortiumMembersResponse contains the response from method BlockchainMembers.ListConsortiumMembers.

type BlockchainMembersListConsortiumMembersResult

type BlockchainMembersListConsortiumMembersResult struct {
	ConsortiumMemberCollection
}

BlockchainMembersListConsortiumMembersResult contains the result from method BlockchainMembers.ListConsortiumMembers.

type BlockchainMembersListOptions

type BlockchainMembersListOptions struct {
}

BlockchainMembersListOptions contains the optional parameters for the BlockchainMembers.List method.

type BlockchainMembersListPager

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

BlockchainMembersListPager provides operations for iterating over paged responses.

func (*BlockchainMembersListPager) Err

Err returns the last error encountered while paging.

func (*BlockchainMembersListPager) NextPage

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

func (*BlockchainMembersListPager) PageResponse

PageResponse returns the current BlockchainMembersListResponse page.

type BlockchainMembersListRegenerateAPIKeysOptions

type BlockchainMembersListRegenerateAPIKeysOptions struct {
	// api key to be regenerate
	APIKey *APIKey
}

BlockchainMembersListRegenerateAPIKeysOptions contains the optional parameters for the BlockchainMembers.ListRegenerateAPIKeys method.

type BlockchainMembersListRegenerateAPIKeysResponse

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

BlockchainMembersListRegenerateAPIKeysResponse contains the response from method BlockchainMembers.ListRegenerateAPIKeys.

type BlockchainMembersListRegenerateAPIKeysResult

type BlockchainMembersListRegenerateAPIKeysResult struct {
	APIKeyCollection
}

BlockchainMembersListRegenerateAPIKeysResult contains the result from method BlockchainMembers.ListRegenerateAPIKeys.

type BlockchainMembersListResponse

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

BlockchainMembersListResponse contains the response from method BlockchainMembers.List.

type BlockchainMembersListResult

type BlockchainMembersListResult struct {
	BlockchainMemberCollection
}

BlockchainMembersListResult contains the result from method BlockchainMembers.List.

type BlockchainMembersUpdateOptions

type BlockchainMembersUpdateOptions struct {
	// Payload to update the blockchain member.
	BlockchainMember *BlockchainMemberUpdate
}

BlockchainMembersUpdateOptions contains the optional parameters for the BlockchainMembers.Update method.

type BlockchainMembersUpdateResponse

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

BlockchainMembersUpdateResponse contains the response from method BlockchainMembers.Update.

type BlockchainMembersUpdateResult

type BlockchainMembersUpdateResult struct {
	BlockchainMember
}

BlockchainMembersUpdateResult contains the result from method BlockchainMembers.Update.

type BlockchainProtocol

type BlockchainProtocol string

BlockchainProtocol - Gets or sets the blockchain protocol.

const (
	BlockchainProtocolCorda        BlockchainProtocol = "Corda"
	BlockchainProtocolNotSpecified BlockchainProtocol = "NotSpecified"
	BlockchainProtocolParity       BlockchainProtocol = "Parity"
	BlockchainProtocolQuorum       BlockchainProtocol = "Quorum"
)

func PossibleBlockchainProtocolValues

func PossibleBlockchainProtocolValues() []BlockchainProtocol

PossibleBlockchainProtocolValues returns the possible values for the BlockchainProtocol const type.

func (BlockchainProtocol) ToPtr

ToPtr returns a *BlockchainProtocol pointing to the current value.

type Consortium

type Consortium struct {
	// Gets or sets the blockchain member name.
	Name *string `json:"name,omitempty"`

	// Gets or sets the protocol for the consortium.
	Protocol *BlockchainProtocol `json:"protocol,omitempty"`
}

Consortium payload

type ConsortiumCollection

type ConsortiumCollection struct {
	// Gets or sets the collection of consortiums.
	Value []*Consortium `json:"value,omitempty"`
}

ConsortiumCollection - Collection of the consortium payload.

func (ConsortiumCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConsortiumCollection.

type ConsortiumMember

type ConsortiumMember struct {
	// Gets the consortium member modified date.
	DateModified *time.Time `json:"dateModified,omitempty"`

	// Gets the consortium member display name.
	DisplayName *string `json:"displayName,omitempty"`

	// Gets the consortium member join date.
	JoinDate *time.Time `json:"joinDate,omitempty"`

	// Gets the consortium member name.
	Name *string `json:"name,omitempty"`

	// Gets the consortium member role.
	Role *string `json:"role,omitempty"`

	// Gets the consortium member status.
	Status *string `json:"status,omitempty"`

	// Gets the consortium member subscription id.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
}

ConsortiumMember - Consortium approval

func (ConsortiumMember) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConsortiumMember.

func (*ConsortiumMember) UnmarshalJSON

func (c *ConsortiumMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConsortiumMember.

type ConsortiumMemberCollection

type ConsortiumMemberCollection struct {
	// Gets or sets the URL, that the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string `json:"nextLink,omitempty"`

	// Gets or sets the collection of consortiums.
	Value []*ConsortiumMember `json:"value,omitempty"`
}

ConsortiumMemberCollection - Collection of consortium payload.

func (ConsortiumMemberCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConsortiumMemberCollection.

type FirewallRule

type FirewallRule struct {
	// Gets or sets the end IP address of the firewall rule range.
	EndIPAddress *string `json:"endIpAddress,omitempty"`

	// Gets or sets the name of the firewall rules.
	RuleName *string `json:"ruleName,omitempty"`

	// Gets or sets the start IP address of the firewall rule range.
	StartIPAddress *string `json:"startIpAddress,omitempty"`
}

FirewallRule - Ip range for firewall rules

type LocationsCheckNameAvailabilityOptions

type LocationsCheckNameAvailabilityOptions struct {
	// Name availability request payload.
	NameAvailabilityRequest *NameAvailabilityRequest
}

LocationsCheckNameAvailabilityOptions contains the optional parameters for the Locations.CheckNameAvailability method.

type LocationsCheckNameAvailabilityResponse

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

LocationsCheckNameAvailabilityResponse contains the response from method Locations.CheckNameAvailability.

type LocationsCheckNameAvailabilityResult

type LocationsCheckNameAvailabilityResult struct {
	NameAvailability
}

LocationsCheckNameAvailabilityResult contains the result from method Locations.CheckNameAvailability.

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

NewLocationsClient creates a new instance of LocationsClient with the specified values.

func (*LocationsClient) CheckNameAvailability

func (client *LocationsClient) CheckNameAvailability(ctx context.Context, locationName string, options *LocationsCheckNameAvailabilityOptions) (LocationsCheckNameAvailabilityResponse, error)

CheckNameAvailability - To check whether a resource name is available. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/Locations_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewLocationsClient("<subscription-id>", cred, nil)
	_, err = client.CheckNameAvailability(ctx,
		"<location-name>",
		&armblockchain.LocationsCheckNameAvailabilityOptions{NameAvailabilityRequest: &armblockchain.NameAvailabilityRequest{
			Name: to.StringPtr("<name>"),
			Type: to.StringPtr("<type>"),
		},
		})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*LocationsClient) ListConsortiums

func (client *LocationsClient) ListConsortiums(ctx context.Context, locationName string, options *LocationsListConsortiumsOptions) (LocationsListConsortiumsResponse, error)

ListConsortiums - Lists the available consortiums for a subscription. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/Locations_ListConsortiums.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewLocationsClient("<subscription-id>", cred, nil)
	_, err = client.ListConsortiums(ctx,
		"<location-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type LocationsListConsortiumsOptions

type LocationsListConsortiumsOptions struct {
}

LocationsListConsortiumsOptions contains the optional parameters for the Locations.ListConsortiums method.

type LocationsListConsortiumsResponse

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

LocationsListConsortiumsResponse contains the response from method Locations.ListConsortiums.

type LocationsListConsortiumsResult

type LocationsListConsortiumsResult struct {
	ConsortiumCollection
}

LocationsListConsortiumsResult contains the result from method Locations.ListConsortiums.

type NameAvailability

type NameAvailability struct {
	// Gets or sets the message.
	Message *string `json:"message,omitempty"`

	// Gets or sets the value indicating whether the name is available.
	NameAvailable *bool `json:"nameAvailable,omitempty"`

	// Gets or sets the name availability reason.
	Reason *NameAvailabilityReason `json:"reason,omitempty"`
}

NameAvailability - Name availability payload which is exposed in the response of the resource provider.

type NameAvailabilityReason

type NameAvailabilityReason string

NameAvailabilityReason - Gets or sets the name availability reason.

const (
	NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists"
	NameAvailabilityReasonInvalid       NameAvailabilityReason = "Invalid"
	NameAvailabilityReasonNotSpecified  NameAvailabilityReason = "NotSpecified"
)

func PossibleNameAvailabilityReasonValues

func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason

PossibleNameAvailabilityReasonValues returns the possible values for the NameAvailabilityReason const type.

func (NameAvailabilityReason) ToPtr

ToPtr returns a *NameAvailabilityReason pointing to the current value.

type NameAvailabilityRequest

type NameAvailabilityRequest struct {
	// Gets or sets the name to check.
	Name *string `json:"name,omitempty"`

	// Gets or sets the type of the resource to check.
	Type *string `json:"type,omitempty"`
}

NameAvailabilityRequest - Name availability request payload which is exposed in the request of the resource provider.

type NodeProvisioningState

type NodeProvisioningState string

NodeProvisioningState - Gets or sets the blockchain member provision state.

const (
	NodeProvisioningStateDeleting     NodeProvisioningState = "Deleting"
	NodeProvisioningStateFailed       NodeProvisioningState = "Failed"
	NodeProvisioningStateNotSpecified NodeProvisioningState = "NotSpecified"
	NodeProvisioningStateSucceeded    NodeProvisioningState = "Succeeded"
	NodeProvisioningStateUpdating     NodeProvisioningState = "Updating"
)

func PossibleNodeProvisioningStateValues

func PossibleNodeProvisioningStateValues() []NodeProvisioningState

PossibleNodeProvisioningStateValues returns the possible values for the NodeProvisioningState const type.

func (NodeProvisioningState) ToPtr

ToPtr returns a *NodeProvisioningState pointing to the current value.

type OperationResult

type OperationResult struct {
	// Gets or sets the operation end time.
	EndTime *time.Time `json:"endTime,omitempty"`

	// Gets or sets the operation name.
	Name *string `json:"name,omitempty"`

	// Gets or sets the operation start time.
	StartTime *time.Time `json:"startTime,omitempty"`
}

OperationResult - Operation result payload which is exposed in the response of the resource provider.

func (OperationResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationResult.

func (*OperationResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult.

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

NewOperationsClient creates a new instance of OperationsClient with the specified values.

func (*OperationsClient) List

List - Lists the available operations of Microsoft.Blockchain resource provider. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewOperationsClient(cred, nil)
	pager := client.List(nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
	}
}
Output:

type OperationsListOptions

type OperationsListOptions struct {
}

OperationsListOptions contains the optional parameters for the Operations.List method.

type OperationsListPager

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

OperationsListPager provides operations for iterating over paged responses.

func (*OperationsListPager) Err

func (p *OperationsListPager) Err() error

Err returns the last error encountered while paging.

func (*OperationsListPager) NextPage

func (p *OperationsListPager) NextPage(ctx context.Context) bool

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

func (*OperationsListPager) PageResponse

func (p *OperationsListPager) PageResponse() OperationsListResponse

PageResponse returns the current OperationsListResponse page.

type OperationsListResponse

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

OperationsListResponse contains the response from method Operations.List.

type OperationsListResult

type OperationsListResult struct {
	ResourceProviderOperationCollection
}

OperationsListResult contains the result from method Operations.List.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource 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; The type of the service - e.g. "Microsoft.Blockchain"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - The core properties of the resources.

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

type ResourceProviderOperation

type ResourceProviderOperation struct {
	// Gets or sets operation display
	Display *ResourceProviderOperationDisplay `json:"display,omitempty"`

	// Gets or sets a value indicating whether the operation is a data action or not.
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Gets or sets the operation name.
	Name *string `json:"name,omitempty"`

	// Gets or sets the origin.
	Origin *string `json:"origin,omitempty"`
}

ResourceProviderOperation - Operation payload which is exposed in the response of the resource provider.

type ResourceProviderOperationCollection

type ResourceProviderOperationCollection struct {
	// Gets or sets the URL, that the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string `json:"nextLink,omitempty"`

	// Gets or sets the collection of operations.
	Value []*ResourceProviderOperation `json:"value,omitempty"`
}

ResourceProviderOperationCollection - Collection of operation payload which is exposed in the response of the resource provider.

func (ResourceProviderOperationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationCollection.

type ResourceProviderOperationDisplay

type ResourceProviderOperationDisplay struct {
	// Gets or sets the description of the provider for display purposes.
	Description *string `json:"description,omitempty"`

	// Gets or sets the name of the operation for display purposes.
	Operation *string `json:"operation,omitempty"`

	// Gets or sets the name of the provider for display purposes.
	Provider *string `json:"provider,omitempty"`

	// Gets or sets the name of the resource type for display purposes.
	Resource *string `json:"resource,omitempty"`
}

ResourceProviderOperationDisplay - Operation display payload which is exposed in the response of the resource provider.

type ResourceTypeSKU

type ResourceTypeSKU struct {
	// Gets or sets the resource type
	ResourceType *string `json:"resourceType,omitempty"`

	// Gets or sets the Skus
	SKUs []*SKUSetting `json:"skus,omitempty"`
}

ResourceTypeSKU - Resource type Sku.

func (ResourceTypeSKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceTypeSKU.

type ResourceTypeSKUCollection

type ResourceTypeSKUCollection struct {
	// Gets or sets the collection of resource type Sku.
	Value []*ResourceTypeSKU `json:"value,omitempty"`
}

ResourceTypeSKUCollection - Collection of the resource type Sku.

func (ResourceTypeSKUCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceTypeSKUCollection.

type SKU

type SKU struct {
	// Gets or sets Sku name
	Name *string `json:"name,omitempty"`

	// Gets or sets Sku tier
	Tier *string `json:"tier,omitempty"`
}

SKU - Blockchain member Sku in payload

type SKUSetting

type SKUSetting struct {
	// Gets or sets the locations.
	Locations []*string `json:"locations,omitempty"`

	// Gets or sets the Sku name.
	Name *string `json:"name,omitempty"`

	// Gets or sets the required features.
	RequiredFeatures []*string `json:"requiredFeatures,omitempty"`

	// Gets or sets the Sku tier.
	Tier *string `json:"tier,omitempty"`
}

SKUSetting - Sku Setting.

func (SKUSetting) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUSetting.

type SKUsClient

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

SKUsClient contains the methods for the SKUs group. Don't use this type directly, use NewSKUsClient() instead.

func NewSKUsClient

func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SKUsClient

NewSKUsClient creates a new instance of SKUsClient with the specified values.

func (*SKUsClient) List

func (client *SKUsClient) List(ctx context.Context, options *SKUsListOptions) (SKUsListResponse, error)

List - Lists the Skus of the resource type. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/Skus_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewSKUsClient("<subscription-id>", cred, nil)
	_, err = client.List(ctx,
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type SKUsListOptions

type SKUsListOptions struct {
}

SKUsListOptions contains the optional parameters for the SKUs.List method.

type SKUsListResponse

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

SKUsListResponse contains the response from method SKUs.List.

type SKUsListResult

type SKUsListResult struct {
	ResourceTypeSKUCollection
}

SKUsListResult contains the result from method SKUs.List.

type TrackedResource

type TrackedResource struct {
	Resource
	// The GEO location of the blockchain service.
	Location *string `json:"location,omitempty"`

	// Tags of the service which is a list of key value pairs that describes the resource.
	Tags map[string]*string `json:"tags,omitempty"`
}

TrackedResource - The resource model definition for a top level resource.

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

type TransactionNode

type TransactionNode struct {
	Resource
	// Gets or sets the transaction node location.
	Location *string `json:"location,omitempty"`

	// Gets or sets the blockchain member properties.
	Properties *TransactionNodeProperties `json:"properties,omitempty"`
}

TransactionNode - Payload of the transaction node which is the request/response of the resource provider.

func (TransactionNode) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TransactionNode.

type TransactionNodeCollection

type TransactionNodeCollection struct {
	// Gets or sets the URL, that the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string `json:"nextLink,omitempty"`

	// Gets or sets the collection of transaction nodes.
	Value []*TransactionNode `json:"value,omitempty"`
}

TransactionNodeCollection - Collection of transaction node payload which is exposed in the request/response of the resource provider.

func (TransactionNodeCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TransactionNodeCollection.

type TransactionNodeProperties

type TransactionNodeProperties struct {
	// Gets or sets the firewall rules.
	FirewallRules []*FirewallRule `json:"firewallRules,omitempty"`

	// Sets the transaction node dns endpoint basic auth password.
	Password *string `json:"password,omitempty"`

	// READ-ONLY; Gets or sets the transaction node dns endpoint.
	DNS *string `json:"dns,omitempty" azure:"ro"`

	// READ-ONLY; Gets or sets the blockchain member provision state.
	ProvisioningState *NodeProvisioningState `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Gets or sets the transaction node public key.
	PublicKey *string `json:"publicKey,omitempty" azure:"ro"`

	// READ-ONLY; Gets or sets the transaction node dns endpoint basic auth user name.
	UserName *string `json:"userName,omitempty" azure:"ro"`
}

TransactionNodeProperties - Payload of transaction node properties payload in the transaction node payload.

func (TransactionNodeProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TransactionNodeProperties.

type TransactionNodePropertiesUpdate

type TransactionNodePropertiesUpdate struct {
	// Gets or sets the firewall rules.
	FirewallRules []*FirewallRule `json:"firewallRules,omitempty"`

	// Sets the transaction node dns endpoint basic auth password.
	Password *string `json:"password,omitempty"`
}

TransactionNodePropertiesUpdate - Update the payload of the transaction node properties in the transaction node payload.

func (TransactionNodePropertiesUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TransactionNodePropertiesUpdate.

type TransactionNodeUpdate

type TransactionNodeUpdate struct {
	// Gets or sets the transaction node update properties.
	Properties *TransactionNodePropertiesUpdate `json:"properties,omitempty"`
}

TransactionNodeUpdate - Update the transaction node payload which is exposed in the request/response of the resource provider.

func (TransactionNodeUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TransactionNodeUpdate.

type TransactionNodesBeginCreateOptions

type TransactionNodesBeginCreateOptions struct {
	// Payload to create the transaction node.
	TransactionNode *TransactionNode
}

TransactionNodesBeginCreateOptions contains the optional parameters for the TransactionNodes.BeginCreate method.

type TransactionNodesBeginDeleteOptions

type TransactionNodesBeginDeleteOptions struct {
}

TransactionNodesBeginDeleteOptions contains the optional parameters for the TransactionNodes.BeginDelete method.

type TransactionNodesClient

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

TransactionNodesClient contains the methods for the TransactionNodes group. Don't use this type directly, use NewTransactionNodesClient() instead.

func NewTransactionNodesClient

func NewTransactionNodesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TransactionNodesClient

NewTransactionNodesClient creates a new instance of TransactionNodesClient with the specified values.

func (*TransactionNodesClient) BeginCreate

func (client *TransactionNodesClient) BeginCreate(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesBeginCreateOptions) (TransactionNodesCreatePollerResponse, error)

BeginCreate - Create or update the transaction node. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewTransactionNodesClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreate(ctx,
		"<blockchain-member-name>",
		"<transaction-node-name>",
		"<resource-group-name>",
		&armblockchain.TransactionNodesBeginCreateOptions{TransactionNode: &armblockchain.TransactionNode{
			Location: to.StringPtr("<location>"),
			Properties: &armblockchain.TransactionNodeProperties{
				Password: to.StringPtr("<password>"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("TransactionNode.ID: %s\n", *res.ID)
}
Output:

func (*TransactionNodesClient) BeginDelete

func (client *TransactionNodesClient) BeginDelete(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesBeginDeleteOptions) (TransactionNodesDeletePollerResponse, error)

BeginDelete - Delete the transaction node. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_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/blockchain/armblockchain"
)

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

func (*TransactionNodesClient) Get

func (client *TransactionNodesClient) Get(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesGetOptions) (TransactionNodesGetResponse, error)

Get - Get the details of the transaction node. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewTransactionNodesClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<blockchain-member-name>",
		"<transaction-node-name>",
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("TransactionNode.ID: %s\n", *res.ID)
}
Output:

func (*TransactionNodesClient) List

func (client *TransactionNodesClient) List(blockchainMemberName string, resourceGroupName string, options *TransactionNodesListOptions) *TransactionNodesListPager

List - Lists the transaction nodes for a blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewTransactionNodesClient("<subscription-id>", cred, nil)
	pager := client.List("<blockchain-member-name>",
		"<resource-group-name>",
		nil)
	for pager.NextPage(ctx) {
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("TransactionNode.ID: %s\n", *v.ID)
		}
	}
}
Output:

func (*TransactionNodesClient) ListAPIKeys

func (client *TransactionNodesClient) ListAPIKeys(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesListAPIKeysOptions) (TransactionNodesListAPIKeysResponse, error)

ListAPIKeys - List the API keys for the transaction node. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_ListApiKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewTransactionNodesClient("<subscription-id>", cred, nil)
	_, err = client.ListAPIKeys(ctx,
		"<blockchain-member-name>",
		"<transaction-node-name>",
		"<resource-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TransactionNodesClient) ListRegenerateAPIKeys

func (client *TransactionNodesClient) ListRegenerateAPIKeys(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesListRegenerateAPIKeysOptions) (TransactionNodesListRegenerateAPIKeysResponse, error)

ListRegenerateAPIKeys - Regenerate the API keys for the blockchain member. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_ListRegenerateApiKeys.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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewTransactionNodesClient("<subscription-id>", cred, nil)
	_, err = client.ListRegenerateAPIKeys(ctx,
		"<blockchain-member-name>",
		"<transaction-node-name>",
		"<resource-group-name>",
		&armblockchain.TransactionNodesListRegenerateAPIKeysOptions{APIKey: &armblockchain.APIKey{
			KeyName: to.StringPtr("<key-name>"),
		},
		})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TransactionNodesClient) Update

func (client *TransactionNodesClient) Update(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesUpdateOptions) (TransactionNodesUpdateResponse, error)

Update - Update the transaction node. If the operation fails it returns a generic error.

Example

x-ms-original-file: specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_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/blockchain/armblockchain"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armblockchain.NewTransactionNodesClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<blockchain-member-name>",
		"<transaction-node-name>",
		"<resource-group-name>",
		&armblockchain.TransactionNodesUpdateOptions{TransactionNode: &armblockchain.TransactionNodeUpdate{
			Properties: &armblockchain.TransactionNodePropertiesUpdate{
				Password: to.StringPtr("<password>"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("TransactionNode.ID: %s\n", *res.ID)
}
Output:

type TransactionNodesCreatePoller

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

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

func (*TransactionNodesCreatePoller) Done

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

func (*TransactionNodesCreatePoller) FinalResponse

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 TransactionNodesCreateResponse will be returned.

func (*TransactionNodesCreatePoller) Poll

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 (*TransactionNodesCreatePoller) ResumeToken

func (p *TransactionNodesCreatePoller) 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 TransactionNodesCreatePollerResponse

type TransactionNodesCreatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *TransactionNodesCreatePoller

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

TransactionNodesCreatePollerResponse contains the response from method TransactionNodes.Create.

func (TransactionNodesCreatePollerResponse) PollUntilDone

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 (*TransactionNodesCreatePollerResponse) Resume

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

type TransactionNodesCreateResponse

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

TransactionNodesCreateResponse contains the response from method TransactionNodes.Create.

type TransactionNodesCreateResult

type TransactionNodesCreateResult struct {
	TransactionNode
}

TransactionNodesCreateResult contains the result from method TransactionNodes.Create.

type TransactionNodesDeletePoller

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

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

func (*TransactionNodesDeletePoller) Done

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

func (*TransactionNodesDeletePoller) FinalResponse

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 TransactionNodesDeleteResponse will be returned.

func (*TransactionNodesDeletePoller) Poll

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 (*TransactionNodesDeletePoller) ResumeToken

func (p *TransactionNodesDeletePoller) 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 TransactionNodesDeletePollerResponse

type TransactionNodesDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *TransactionNodesDeletePoller

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

TransactionNodesDeletePollerResponse contains the response from method TransactionNodes.Delete.

func (TransactionNodesDeletePollerResponse) PollUntilDone

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 (*TransactionNodesDeletePollerResponse) Resume

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

type TransactionNodesDeleteResponse

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

TransactionNodesDeleteResponse contains the response from method TransactionNodes.Delete.

type TransactionNodesGetOptions

type TransactionNodesGetOptions struct {
}

TransactionNodesGetOptions contains the optional parameters for the TransactionNodes.Get method.

type TransactionNodesGetResponse

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

TransactionNodesGetResponse contains the response from method TransactionNodes.Get.

type TransactionNodesGetResult

type TransactionNodesGetResult struct {
	TransactionNode
}

TransactionNodesGetResult contains the result from method TransactionNodes.Get.

type TransactionNodesListAPIKeysOptions

type TransactionNodesListAPIKeysOptions struct {
}

TransactionNodesListAPIKeysOptions contains the optional parameters for the TransactionNodes.ListAPIKeys method.

type TransactionNodesListAPIKeysResponse

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

TransactionNodesListAPIKeysResponse contains the response from method TransactionNodes.ListAPIKeys.

type TransactionNodesListAPIKeysResult

type TransactionNodesListAPIKeysResult struct {
	APIKeyCollection
}

TransactionNodesListAPIKeysResult contains the result from method TransactionNodes.ListAPIKeys.

type TransactionNodesListOptions

type TransactionNodesListOptions struct {
}

TransactionNodesListOptions contains the optional parameters for the TransactionNodes.List method.

type TransactionNodesListPager

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

TransactionNodesListPager provides operations for iterating over paged responses.

func (*TransactionNodesListPager) Err

Err returns the last error encountered while paging.

func (*TransactionNodesListPager) NextPage

func (p *TransactionNodesListPager) NextPage(ctx context.Context) bool

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

func (*TransactionNodesListPager) PageResponse

PageResponse returns the current TransactionNodesListResponse page.

type TransactionNodesListRegenerateAPIKeysOptions

type TransactionNodesListRegenerateAPIKeysOptions struct {
	// api key to be regenerated
	APIKey *APIKey
}

TransactionNodesListRegenerateAPIKeysOptions contains the optional parameters for the TransactionNodes.ListRegenerateAPIKeys method.

type TransactionNodesListRegenerateAPIKeysResponse

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

TransactionNodesListRegenerateAPIKeysResponse contains the response from method TransactionNodes.ListRegenerateAPIKeys.

type TransactionNodesListRegenerateAPIKeysResult

type TransactionNodesListRegenerateAPIKeysResult struct {
	APIKeyCollection
}

TransactionNodesListRegenerateAPIKeysResult contains the result from method TransactionNodes.ListRegenerateAPIKeys.

type TransactionNodesListResponse

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

TransactionNodesListResponse contains the response from method TransactionNodes.List.

type TransactionNodesListResult

type TransactionNodesListResult struct {
	TransactionNodeCollection
}

TransactionNodesListResult contains the result from method TransactionNodes.List.

type TransactionNodesUpdateOptions

type TransactionNodesUpdateOptions struct {
	// Payload to create the transaction node.
	TransactionNode *TransactionNodeUpdate
}

TransactionNodesUpdateOptions contains the optional parameters for the TransactionNodes.Update method.

type TransactionNodesUpdateResponse

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

TransactionNodesUpdateResponse contains the response from method TransactionNodes.Update.

type TransactionNodesUpdateResult

type TransactionNodesUpdateResult struct {
	TransactionNode
}

TransactionNodesUpdateResult contains the result from method TransactionNodes.Update.

Jump to

Keyboard shortcuts

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