armblockchain

package module
v0.7.0 Latest Latest
Warning

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

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

README

Azure Blockchain Module for Go

PkgGoDev

The armblockchain module provides operations for working with Azure Blockchain.

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure 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.

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewMembersClient()

Fakes

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

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

Provide Feedback

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

	// Gets or sets the API key value.
	Value *string
}

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

func (APIKey) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type APIKey.

func (*APIKey) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIKey.

type APIKeyCollection

type APIKeyCollection struct {
	// Gets or sets the collection of API key.
	Keys []*APIKey
}

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.

func (*APIKeyCollection) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIKeyCollection.

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.

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.

type ClientFactory added in v0.6.0

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

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

func NewClientFactory added in v0.6.0

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

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

  • subscriptionID - Gets the subscription Id which uniquely identifies the Microsoft Azure subscription. The subscription ID is part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewLocationsClient added in v0.6.0

func (c *ClientFactory) NewLocationsClient() *LocationsClient

NewLocationsClient creates a new instance of LocationsClient.

func (*ClientFactory) NewMemberOperationResultsClient added in v0.6.0

func (c *ClientFactory) NewMemberOperationResultsClient() *MemberOperationResultsClient

NewMemberOperationResultsClient creates a new instance of MemberOperationResultsClient.

func (*ClientFactory) NewMembersClient added in v0.6.0

func (c *ClientFactory) NewMembersClient() *MembersClient

NewMembersClient creates a new instance of MembersClient.

func (*ClientFactory) NewOperationsClient added in v0.6.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewSKUsClient added in v0.6.0

func (c *ClientFactory) NewSKUsClient() *SKUsClient

NewSKUsClient creates a new instance of SKUsClient.

func (*ClientFactory) NewTransactionNodesClient added in v0.6.0

func (c *ClientFactory) NewTransactionNodesClient() *TransactionNodesClient

NewTransactionNodesClient creates a new instance of TransactionNodesClient.

type Consortium

type Consortium struct {
	// Gets or sets the blockchain member name.
	Name *string

	// Gets or sets the protocol for the consortium.
	Protocol *BlockchainProtocol
}

Consortium payload

func (Consortium) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type Consortium.

func (*Consortium) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Consortium.

type ConsortiumCollection

type ConsortiumCollection struct {
	// Gets or sets the collection of consortiums.
	Value []*Consortium
}

ConsortiumCollection - Collection of the consortium payload.

func (ConsortiumCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConsortiumCollection.

func (*ConsortiumCollection) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConsortiumCollection.

type ConsortiumMember

type ConsortiumMember struct {
	// Gets the consortium member modified date.
	DateModified *time.Time

	// Gets the consortium member display name.
	DisplayName *string

	// Gets the consortium member join date.
	JoinDate *time.Time

	// Gets the consortium member name.
	Name *string

	// Gets the consortium member role.
	Role *string

	// Gets the consortium member status.
	Status *string

	// Gets the consortium member subscription id.
	SubscriptionID *string
}

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

	// Gets or sets the collection of consortiums.
	Value []*ConsortiumMember
}

ConsortiumMemberCollection - Collection of consortium payload.

func (ConsortiumMemberCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConsortiumMemberCollection.

func (*ConsortiumMemberCollection) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConsortiumMemberCollection.

type FirewallRule

type FirewallRule struct {
	// Gets or sets the end IP address of the firewall rule range.
	EndIPAddress *string

	// Gets or sets the name of the firewall rules.
	RuleName *string

	// Gets or sets the start IP address of the firewall rule range.
	StartIPAddress *string
}

FirewallRule - Ip range for firewall rules

func (FirewallRule) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type FirewallRule.

func (*FirewallRule) UnmarshalJSON added in v0.6.0

func (f *FirewallRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRule.

type LocationsClient

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

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

func NewLocationsClient

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

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

  • subscriptionID - Gets the subscription Id which uniquely identifies the Microsoft Azure subscription. The subscription ID is part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*LocationsClient) CheckNameAvailability

CheckNameAvailability - To check whether a resource name is available. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • locationName - Location Name.
  • options - LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLocationsClient().CheckNameAvailability(ctx, "southeastasia", &armblockchain.LocationsClientCheckNameAvailabilityOptions{NameAvailabilityRequest: &armblockchain.NameAvailabilityRequest{
		Name: to.Ptr("contosemember1"),
		Type: to.Ptr("Microsoft.Blockchain/blockchainMembers"),
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NameAvailability = armblockchain.NameAvailability{
	// 	Message: to.Ptr("A blockchain member named 'contosemember1' is already in use."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr(armblockchain.NameAvailabilityReasonAlreadyExists),
	// }
}
Output:

func (*LocationsClient) ListConsortiums

ListConsortiums - Lists the available consortiums for a subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • locationName - Location Name.
  • options - LocationsClientListConsortiumsOptions contains the optional parameters for the LocationsClient.ListConsortiums method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewLocationsClient().ListConsortiums(ctx, "southeastasia", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ConsortiumCollection = armblockchain.ConsortiumCollection{
	// 	Value: []*armblockchain.Consortium{
	// 		{
	// 			Name: to.Ptr("gebiconsortium1"),
	// 			Protocol: to.Ptr(armblockchain.BlockchainProtocolParity),
	// 		},
	// 		{
	// 			Name: to.Ptr("bwtestpsh"),
	// 			Protocol: to.Ptr(armblockchain.BlockchainProtocolParity),
	// 		},
	// 		{
	// 			Name: to.Ptr("jackyhsuconsortium"),
	// 			Protocol: to.Ptr(armblockchain.BlockchainProtocolQuorum),
	// 	}},
	// }
}
Output:

type LocationsClientCheckNameAvailabilityOptions added in v0.2.0

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

LocationsClientCheckNameAvailabilityOptions contains the optional parameters for the LocationsClient.CheckNameAvailability method.

type LocationsClientCheckNameAvailabilityResponse added in v0.2.0

type LocationsClientCheckNameAvailabilityResponse struct {
	// Name availability payload which is exposed in the response of the resource provider.
	NameAvailability
}

LocationsClientCheckNameAvailabilityResponse contains the response from method LocationsClient.CheckNameAvailability.

type LocationsClientListConsortiumsOptions added in v0.2.0

type LocationsClientListConsortiumsOptions struct {
}

LocationsClientListConsortiumsOptions contains the optional parameters for the LocationsClient.ListConsortiums method.

type LocationsClientListConsortiumsResponse added in v0.2.0

type LocationsClientListConsortiumsResponse struct {
	// Collection of the consortium payload.
	ConsortiumCollection
}

LocationsClientListConsortiumsResponse contains the response from method LocationsClient.ListConsortiums.

type Member added in v0.2.0

type Member struct {
	// The GEO location of the blockchain service.
	Location *string

	// Gets or sets the blockchain member properties.
	Properties *MemberProperties

	// Gets or sets the blockchain member Sku.
	SKU *SKU

	// Tags of the service which is a list of key value pairs that describes the resource.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource Id of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the service - e.g. "Microsoft.Blockchain"
	Type *string
}

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

func (Member) MarshalJSON added in v0.2.0

func (m Member) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Member.

func (*Member) UnmarshalJSON added in v0.6.0

func (m *Member) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Member.

type MemberCollection added in v0.2.0

type MemberCollection 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

	// Gets or sets the collection of blockchain members.
	Value []*Member
}

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

func (MemberCollection) MarshalJSON added in v0.2.0

func (m MemberCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MemberCollection.

func (*MemberCollection) UnmarshalJSON added in v0.6.0

func (m *MemberCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MemberCollection.

type MemberNodesSKU added in v0.2.0

type MemberNodesSKU struct {
	// Gets or sets the nodes capacity.
	Capacity *int32
}

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

func (MemberNodesSKU) MarshalJSON added in v0.6.0

func (m MemberNodesSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MemberNodesSKU.

func (*MemberNodesSKU) UnmarshalJSON added in v0.6.0

func (m *MemberNodesSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MemberNodesSKU.

type MemberOperationResultsClient added in v0.2.0

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

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

func NewMemberOperationResultsClient added in v0.2.0

func NewMemberOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MemberOperationResultsClient, error)

NewMemberOperationResultsClient creates a new instance of MemberOperationResultsClient with the specified values.

  • subscriptionID - Gets the subscription Id which uniquely identifies the Microsoft Azure subscription. The subscription ID is part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MemberOperationResultsClient) Get added in v0.2.0

Get - Get Async operation result. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • locationName - Location name.
  • operationID - Operation Id.
  • options - MemberOperationResultsClientGetOptions contains the optional parameters for the MemberOperationResultsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMemberOperationResultsClient().Get(ctx, "southeastasia", "12f4b309-01e3-4fcf-bc0b-1cc034ca03f8", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OperationResult = armblockchain.OperationResult{
	// 	Name: to.Ptr("DeleteTransactionNode"),
	// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-23T22:28:04.677Z"); return t}()),
	// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-23T22:34:00.330Z"); return t}()),
	// }
}
Output:

type MemberOperationResultsClientGetOptions added in v0.2.0

type MemberOperationResultsClientGetOptions struct {
}

MemberOperationResultsClientGetOptions contains the optional parameters for the MemberOperationResultsClient.Get method.

type MemberOperationResultsClientGetResponse added in v0.2.0

type MemberOperationResultsClientGetResponse struct {
	// Operation result payload which is exposed in the response of the resource provider.
	OperationResult
}

MemberOperationResultsClientGetResponse contains the response from method MemberOperationResultsClient.Get.

type MemberProperties added in v0.2.0

type MemberProperties struct {
	// Gets or sets the consortium for the blockchain member.
	Consortium *string

	// Sets the managed consortium management account password.
	ConsortiumManagementAccountPassword *string

	// Gets the display name of the member in the consortium.
	ConsortiumMemberDisplayName *string

	// Gets the role of the member in the consortium.
	ConsortiumRole *string

	// Gets or sets firewall rules
	FirewallRules []*FirewallRule

	// Sets the basic auth password of the blockchain member.
	Password *string

	// Gets or sets the blockchain protocol.
	Protocol *BlockchainProtocol

	// Gets or sets the blockchain validator nodes Sku.
	ValidatorNodesSKU *MemberNodesSKU

	// READ-ONLY; Gets the managed consortium management account address.
	ConsortiumManagementAccountAddress *string

	// READ-ONLY; Gets the dns endpoint of the blockchain member.
	DNS *string

	// READ-ONLY; Gets or sets the blockchain member provision state.
	ProvisioningState *BlockchainMemberProvisioningState

	// READ-ONLY; Gets the public key of the blockchain member (default transaction node).
	PublicKey *string

	// READ-ONLY; Gets the Ethereum root contract address of the blockchain.
	RootContractAddress *string

	// READ-ONLY; Gets the auth user name of the blockchain member.
	UserName *string
}

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

func (MemberProperties) MarshalJSON added in v0.2.0

func (m MemberProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MemberProperties.

func (*MemberProperties) UnmarshalJSON added in v0.6.0

func (m *MemberProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MemberProperties.

type MemberPropertiesUpdate added in v0.2.0

type MemberPropertiesUpdate struct {
	// Sets the managed consortium management account password.
	ConsortiumManagementAccountPassword *string

	// Gets or sets the firewall rules.
	FirewallRules []*FirewallRule

	// Sets the transaction node dns endpoint basic auth password.
	Password *string
}

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

func (MemberPropertiesUpdate) MarshalJSON added in v0.2.0

func (m MemberPropertiesUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MemberPropertiesUpdate.

func (*MemberPropertiesUpdate) UnmarshalJSON added in v0.6.0

func (m *MemberPropertiesUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MemberPropertiesUpdate.

type MemberUpdate added in v0.2.0

type MemberUpdate struct {
	// Gets or sets the blockchain member update properties.
	Properties *MemberPropertiesUpdate

	// Tags of the service which is a list of key value pairs that describes the resource.
	Tags map[string]*string
}

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

func (MemberUpdate) MarshalJSON added in v0.2.0

func (m MemberUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MemberUpdate.

func (*MemberUpdate) UnmarshalJSON added in v0.6.0

func (m *MemberUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MemberUpdate.

type MembersClient added in v0.2.0

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

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

func NewMembersClient added in v0.2.0

func NewMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MembersClient, error)

NewMembersClient creates a new instance of MembersClient with the specified values.

  • subscriptionID - Gets the subscription Id which uniquely identifies the Microsoft Azure subscription. The subscription ID is part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MembersClient) BeginCreate added in v0.2.0

func (client *MembersClient) BeginCreate(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *MembersClientBeginCreateOptions) (*runtime.Poller[MembersClientCreateResponse], error)

BeginCreate - Create a blockchain member. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientBeginCreateOptions contains the optional parameters for the MembersClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_Create.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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMembersClient().BeginCreate(ctx, "contosemember1", "mygroup", &armblockchain.MembersClientBeginCreateOptions{BlockchainMember: &armblockchain.Member{
		Location: to.Ptr("southeastasia"),
		Properties: &armblockchain.MemberProperties{
			Consortium:                          to.Ptr("ContoseConsortium"),
			ConsortiumManagementAccountPassword: to.Ptr("<consortiumManagementAccountPassword>"),
			Password:                            to.Ptr("<password>"),
			ValidatorNodesSKU: &armblockchain.MemberNodesSKU{
				Capacity: to.Ptr[int32](2),
			},
			Protocol: to.Ptr(armblockchain.BlockchainProtocolQuorum),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Member = armblockchain.Member{
	// 	Name: to.Ptr("contosemember1"),
	// 	Type: to.Ptr("Microsoft.Blockchain/blockchainMembers"),
	// 	ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1"),
	// 	Location: to.Ptr("southeastasia"),
	// 	Properties: &armblockchain.MemberProperties{
	// 		Consortium: to.Ptr("ContoseConsortium"),
	// 		ProvisioningState: to.Ptr(armblockchain.BlockchainMemberProvisioningStateSucceeded),
	// 		UserName: to.Ptr("contosemember1"),
	// 		ValidatorNodesSKU: &armblockchain.MemberNodesSKU{
	// 			Capacity: to.Ptr[int32](2),
	// 		},
	// 		Protocol: to.Ptr(armblockchain.BlockchainProtocolQuorum),
	// 	},
	// }
}
Output:

func (*MembersClient) BeginDelete added in v0.2.0

func (client *MembersClient) BeginDelete(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *MembersClientBeginDeleteOptions) (*runtime.Poller[MembersClientDeleteResponse], error)

BeginDelete - Delete a blockchain member. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientBeginDeleteOptions contains the optional parameters for the MembersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/BlockchainMembers_Delete.json

package main

import (
	"context"
	"log"

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

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

func (*MembersClient) Get added in v0.2.0

func (client *MembersClient) Get(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *MembersClientGetOptions) (MembersClientGetResponse, error)

Get - Get details about a blockchain member. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientGetOptions contains the optional parameters for the MembersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMembersClient().Get(ctx, "contosemember1", "mygroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Member = armblockchain.Member{
	// 	Name: to.Ptr("contosemember1"),
	// 	Type: to.Ptr("Microsoft.Blockchain/blockchainMembers"),
	// 	ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1"),
	// 	Location: to.Ptr("southeastasia"),
	// 	Properties: &armblockchain.MemberProperties{
	// 		Consortium: to.Ptr("ContoseConsortium"),
	// 		ConsortiumManagementAccountAddress: to.Ptr("0xc40d40dedc353885d3e8393735cf799e4d7fe38c"),
	// 		ConsortiumMemberDisplayName: to.Ptr("contosemember1"),
	// 		ConsortiumRole: to.Ptr("ADMIN"),
	// 		DNS: to.Ptr("contosemember1.blockchain.azure.com"),
	// 		ProvisioningState: to.Ptr(armblockchain.BlockchainMemberProvisioningStateSucceeded),
	// 		PublicKey: to.Ptr("1VhPX4PbNGnE9dOEjgTrw92dltBpKxFQjXWNugcwvl0="),
	// 		RootContractAddress: to.Ptr("0x7407947df2f67142340ca7d1a2c120f0dbfd30e1"),
	// 		UserName: to.Ptr("contosemember1"),
	// 		ValidatorNodesSKU: &armblockchain.MemberNodesSKU{
	// 			Capacity: to.Ptr[int32](2),
	// 		},
	// 		Protocol: to.Ptr(armblockchain.BlockchainProtocolQuorum),
	// 	},
	// }
}
Output:

func (*MembersClient) ListAPIKeys added in v0.2.0

func (client *MembersClient) ListAPIKeys(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *MembersClientListAPIKeysOptions) (MembersClientListAPIKeysResponse, error)

ListAPIKeys - Lists the API keys for a blockchain member. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientListAPIKeysOptions contains the optional parameters for the MembersClient.ListAPIKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMembersClient().ListAPIKeys(ctx, "contosemember1", "mygroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.APIKeyCollection = armblockchain.APIKeyCollection{
	// 	Keys: []*armblockchain.APIKey{
	// 		{
	// 			KeyName: to.Ptr("key1"),
	// 			Value: to.Ptr("-EnIUzu29xj60xPJmstyCURo"),
	// 		},
	// 		{
	// 			KeyName: to.Ptr("key2"),
	// 			Value: to.Ptr("I8P-q4u_WDuCZUBYXnJ3yYX7"),
	// 	}},
	// }
}
Output:

func (*MembersClient) ListRegenerateAPIKeys added in v0.2.0

func (client *MembersClient) ListRegenerateAPIKeys(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *MembersClientListRegenerateAPIKeysOptions) (MembersClientListRegenerateAPIKeysResponse, error)

ListRegenerateAPIKeys - Regenerate the API keys for a blockchain member. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientListRegenerateAPIKeysOptions contains the optional parameters for the MembersClient.ListRegenerateAPIKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMembersClient().ListRegenerateAPIKeys(ctx, "contosemember1", "mygroup", &armblockchain.MembersClientListRegenerateAPIKeysOptions{APIKey: &armblockchain.APIKey{
		KeyName: to.Ptr("key1"),
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.APIKeyCollection = armblockchain.APIKeyCollection{
	// 	Keys: []*armblockchain.APIKey{
	// 		{
	// 			KeyName: to.Ptr("key1"),
	// 			Value: to.Ptr("-EnIUzu29xj60xPJmstyCURo"),
	// 		},
	// 		{
	// 			KeyName: to.Ptr("key2"),
	// 			Value: to.Ptr("-EHio4yRJLxajDaxRNaoD7cZ"),
	// 	}},
	// }
}
Output:

func (*MembersClient) NewListAllPager added in v0.4.0

NewListAllPager - Lists the blockchain members for a subscription.

Generated from API version 2018-06-01-preview

  • options - MembersClientListAllOptions contains the optional parameters for the MembersClient.NewListAllPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMembersClient().NewListAllPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.MemberCollection = armblockchain.MemberCollection{
		// 	Value: []*armblockchain.Member{
		// 		{
		// 			Name: to.Ptr("contosemember1"),
		// 			Type: to.Ptr("Microsoft.Blockchain/blockchainMembers"),
		// 			ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1"),
		// 			Location: to.Ptr("southeastasia"),
		// 			Properties: &armblockchain.MemberProperties{
		// 				Consortium: to.Ptr("ContoseConsortium"),
		// 				ConsortiumMemberDisplayName: to.Ptr("contosemember1"),
		// 				ConsortiumRole: to.Ptr("ADMIN"),
		// 				DNS: to.Ptr("contosemember1.blockchain.azure.com"),
		// 				ProvisioningState: to.Ptr(armblockchain.BlockchainMemberProvisioningStateSucceeded),
		// 				PublicKey: to.Ptr("1VhPX4PbNGnE9dOEjgTrw92dltBpKxFQjXWNugcwvl0="),
		// 				RootContractAddress: to.Ptr("0x7407947df2f67142340ca7d1a2c120f0dbfd30e1"),
		// 				UserName: to.Ptr("contosemember1"),
		// 				ValidatorNodesSKU: &armblockchain.MemberNodesSKU{
		// 					Capacity: to.Ptr[int32](2),
		// 				},
		// 				Protocol: to.Ptr(armblockchain.BlockchainProtocolQuorum),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MembersClient) NewListConsortiumMembersPager added in v0.4.0

func (client *MembersClient) NewListConsortiumMembersPager(blockchainMemberName string, resourceGroupName string, options *MembersClientListConsortiumMembersOptions) *runtime.Pager[MembersClientListConsortiumMembersResponse]

NewListConsortiumMembersPager - Lists the consortium members for a blockchain member.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientListConsortiumMembersOptions contains the optional parameters for the MembersClient.NewListConsortiumMembersPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMembersClient().NewListConsortiumMembersPager("contosemember1", "mygroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ConsortiumMemberCollection = armblockchain.ConsortiumMemberCollection{
		// 	Value: []*armblockchain.ConsortiumMember{
		// 		{
		// 			Name: to.Ptr("contosemember1"),
		// 			DateModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-23T22:34:00.330Z"); return t}()),
		// 			DisplayName: to.Ptr("Contose member 1"),
		// 			JoinDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-23T22:34:00.330Z"); return t}()),
		// 			Role: to.Ptr("Member"),
		// 			Status: to.Ptr("Ready"),
		// 			SubscriptionID: to.Ptr("51766542-3ed7-4a72-a187-0c8ab644ddab"),
		// 		},
		// 		{
		// 			Name: to.Ptr(""),
		// 			DateModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-06-23T22:34:00.330Z"); return t}()),
		// 			Role: to.Ptr("ADMIN"),
		// 			Status: to.Ptr("Invited"),
		// 			SubscriptionID: to.Ptr("02bf808a-5446-4e54-aea8-39723aaa05e7"),
		// 	}},
		// }
	}
}
Output:

func (*MembersClient) NewListPager added in v0.4.0

func (client *MembersClient) NewListPager(resourceGroupName string, options *MembersClientListOptions) *runtime.Pager[MembersClientListResponse]

NewListPager - Lists the blockchain members for a resource group.

Generated from API version 2018-06-01-preview

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientListOptions contains the optional parameters for the MembersClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMembersClient().NewListPager("mygroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.MemberCollection = armblockchain.MemberCollection{
		// 	Value: []*armblockchain.Member{
		// 		{
		// 			Name: to.Ptr("contosemember1"),
		// 			Type: to.Ptr("Microsoft.Blockchain/blockchainMembers"),
		// 			ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1"),
		// 			Location: to.Ptr("southeastasia"),
		// 			Properties: &armblockchain.MemberProperties{
		// 				Consortium: to.Ptr("ContoseConsortium"),
		// 				ConsortiumMemberDisplayName: to.Ptr("contosemember1"),
		// 				ConsortiumRole: to.Ptr("ADMIN"),
		// 				DNS: to.Ptr("contosemember1.blockchain.azure.com"),
		// 				ProvisioningState: to.Ptr(armblockchain.BlockchainMemberProvisioningStateSucceeded),
		// 				PublicKey: to.Ptr("1VhPX4PbNGnE9dOEjgTrw92dltBpKxFQjXWNugcwvl0="),
		// 				RootContractAddress: to.Ptr("0x7407947df2f67142340ca7d1a2c120f0dbfd30e1"),
		// 				UserName: to.Ptr("contosemember1"),
		// 				ValidatorNodesSKU: &armblockchain.MemberNodesSKU{
		// 					Capacity: to.Ptr[int32](2),
		// 				},
		// 				Protocol: to.Ptr(armblockchain.BlockchainProtocolQuorum),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MembersClient) Update added in v0.2.0

func (client *MembersClient) Update(ctx context.Context, blockchainMemberName string, resourceGroupName string, options *MembersClientUpdateOptions) (MembersClientUpdateResponse, error)

Update - Update a blockchain member. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - MembersClientUpdateOptions contains the optional parameters for the MembersClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMembersClient().Update(ctx, "ContoseMember1", "mygroup", &armblockchain.MembersClientUpdateOptions{BlockchainMember: &armblockchain.MemberUpdate{
		Properties: &armblockchain.MemberPropertiesUpdate{
			Password:                            to.Ptr("<password>"),
			ConsortiumManagementAccountPassword: to.Ptr("<consortiumManagementAccountPassword>"),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Member = armblockchain.Member{
	// 	Name: to.Ptr("ContoseMember1"),
	// 	Type: to.Ptr("Microsoft.Blockchain/blockchainMembers"),
	// 	ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/ContoseMember1"),
	// 	Location: to.Ptr("southeastasia"),
	// 	Properties: &armblockchain.MemberProperties{
	// 		Consortium: to.Ptr("ContoseConsortium"),
	// 		ConsortiumMemberDisplayName: to.Ptr("contosemember1"),
	// 		ConsortiumRole: to.Ptr("ADMIN"),
	// 		ProvisioningState: to.Ptr(armblockchain.BlockchainMemberProvisioningStateSucceeded),
	// 		UserName: to.Ptr("testuser1"),
	// 		ValidatorNodesSKU: &armblockchain.MemberNodesSKU{
	// 			Capacity: to.Ptr[int32](2),
	// 		},
	// 		Protocol: to.Ptr(armblockchain.BlockchainProtocolQuorum),
	// 	},
	// }
}
Output:

type MembersClientBeginCreateOptions added in v0.2.0

type MembersClientBeginCreateOptions struct {
	// Payload to create a blockchain member.
	BlockchainMember *Member

	// Resumes the LRO from the provided token.
	ResumeToken string
}

MembersClientBeginCreateOptions contains the optional parameters for the MembersClient.BeginCreate method.

type MembersClientBeginDeleteOptions added in v0.2.0

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

MembersClientBeginDeleteOptions contains the optional parameters for the MembersClient.BeginDelete method.

type MembersClientCreateResponse added in v0.2.0

type MembersClientCreateResponse struct {
	// Payload of the blockchain member which is exposed in the request/response of the resource provider.
	Member
}

MembersClientCreateResponse contains the response from method MembersClient.BeginCreate.

type MembersClientDeleteResponse added in v0.2.0

type MembersClientDeleteResponse struct {
}

MembersClientDeleteResponse contains the response from method MembersClient.BeginDelete.

type MembersClientGetOptions added in v0.2.0

type MembersClientGetOptions struct {
}

MembersClientGetOptions contains the optional parameters for the MembersClient.Get method.

type MembersClientGetResponse added in v0.2.0

type MembersClientGetResponse struct {
	// Payload of the blockchain member which is exposed in the request/response of the resource provider.
	Member
}

MembersClientGetResponse contains the response from method MembersClient.Get.

type MembersClientListAPIKeysOptions added in v0.2.0

type MembersClientListAPIKeysOptions struct {
}

MembersClientListAPIKeysOptions contains the optional parameters for the MembersClient.ListAPIKeys method.

type MembersClientListAPIKeysResponse added in v0.2.0

type MembersClientListAPIKeysResponse struct {
	// Collection of the API key payload which is exposed in the response of the resource provider.
	APIKeyCollection
}

MembersClientListAPIKeysResponse contains the response from method MembersClient.ListAPIKeys.

type MembersClientListAllOptions added in v0.2.0

type MembersClientListAllOptions struct {
}

MembersClientListAllOptions contains the optional parameters for the MembersClient.NewListAllPager method.

type MembersClientListAllResponse added in v0.2.0

type MembersClientListAllResponse struct {
	// Collection of the blockchain member payload which is exposed in the request/response of the resource provider.
	MemberCollection
}

MembersClientListAllResponse contains the response from method MembersClient.NewListAllPager.

type MembersClientListConsortiumMembersOptions added in v0.2.0

type MembersClientListConsortiumMembersOptions struct {
}

MembersClientListConsortiumMembersOptions contains the optional parameters for the MembersClient.NewListConsortiumMembersPager method.

type MembersClientListConsortiumMembersResponse added in v0.2.0

type MembersClientListConsortiumMembersResponse struct {
	// Collection of consortium payload.
	ConsortiumMemberCollection
}

MembersClientListConsortiumMembersResponse contains the response from method MembersClient.NewListConsortiumMembersPager.

type MembersClientListOptions added in v0.2.0

type MembersClientListOptions struct {
}

MembersClientListOptions contains the optional parameters for the MembersClient.NewListPager method.

type MembersClientListRegenerateAPIKeysOptions added in v0.2.0

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

MembersClientListRegenerateAPIKeysOptions contains the optional parameters for the MembersClient.ListRegenerateAPIKeys method.

type MembersClientListRegenerateAPIKeysResponse added in v0.2.0

type MembersClientListRegenerateAPIKeysResponse struct {
	// Collection of the API key payload which is exposed in the response of the resource provider.
	APIKeyCollection
}

MembersClientListRegenerateAPIKeysResponse contains the response from method MembersClient.ListRegenerateAPIKeys.

type MembersClientListResponse added in v0.2.0

type MembersClientListResponse struct {
	// Collection of the blockchain member payload which is exposed in the request/response of the resource provider.
	MemberCollection
}

MembersClientListResponse contains the response from method MembersClient.NewListPager.

type MembersClientUpdateOptions added in v0.2.0

type MembersClientUpdateOptions struct {
	// Payload to update the blockchain member.
	BlockchainMember *MemberUpdate
}

MembersClientUpdateOptions contains the optional parameters for the MembersClient.Update method.

type MembersClientUpdateResponse added in v0.2.0

type MembersClientUpdateResponse struct {
	// Payload of the blockchain member which is exposed in the request/response of the resource provider.
	Member
}

MembersClientUpdateResponse contains the response from method MembersClient.Update.

type NameAvailability

type NameAvailability struct {
	// Gets or sets the message.
	Message *string

	// Gets or sets the value indicating whether the name is available.
	NameAvailable *bool

	// Gets or sets the name availability reason.
	Reason *NameAvailabilityReason
}

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

func (NameAvailability) MarshalJSON added in v0.6.0

func (n NameAvailability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailability.

func (*NameAvailability) UnmarshalJSON added in v0.6.0

func (n *NameAvailability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailability.

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.

type NameAvailabilityRequest

type NameAvailabilityRequest struct {
	// Gets or sets the name to check.
	Name *string

	// Gets or sets the type of the resource to check.
	Type *string
}

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

func (NameAvailabilityRequest) MarshalJSON added in v0.6.0

func (n NameAvailabilityRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailabilityRequest.

func (*NameAvailabilityRequest) UnmarshalJSON added in v0.6.0

func (n *NameAvailabilityRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityRequest.

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.

type OperationResult

type OperationResult struct {
	// Gets or sets the operation end time.
	EndTime *time.Time

	// Gets or sets the operation name.
	Name *string

	// Gets or sets the operation start time.
	StartTime *time.Time
}

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, error)

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

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

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Lists the available operations of Microsoft.Blockchain resource provider.

Generated from API version 2018-06-01-preview

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ResourceProviderOperationCollection = armblockchain.ResourceProviderOperationCollection{
		// 	Value: []*armblockchain.ResourceProviderOperation{
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/register/action"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Registers the subscription for the Blockchain Resource Provider."),
		// 				Operation: to.Ptr("Register the Blockchain Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Resource Provider"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/read"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Gets or Lists existing Blockchain Member(s)."),
		// 				Operation: to.Ptr("Get or List Blockchain Member(s)"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Members"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/write"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Creates or Updates a Blockchain Member."),
		// 				Operation: to.Ptr("Create or Update Blockchain Member"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Members"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/delete"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Deletes an existing Blockchain Member."),
		// 				Operation: to.Ptr("Delete Blockchain Member"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Members"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes/read"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Gets or Lists existing Blockchain Member Transaction Node(s)."),
		// 				Operation: to.Ptr("Get or List Blockchain Member Transaction Node(s)"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Member Transaction Nodes"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes/write"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Creates or Updates a Blockchain Member Transaction Node."),
		// 				Operation: to.Ptr("Create or Update Blockchain Member Transaction Node"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Member Transaction Nodes"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes/delete"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Deletes an existing Blockchain Member Transaction Node."),
		// 				Operation: to.Ptr("Delete Blockchain Member Transaction Node"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Member Transaction Nodes"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes/connect/action"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Connects to a Blockchain Member Transaction Node."),
		// 				Operation: to.Ptr("Connect Blockchain Member Transaction Node"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Blockchain Member Transaction Nodes"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/locations/blockchainMemberOperationResults/read"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Gets the Operation Results of Blockchain Members."),
		// 				Operation: to.Ptr("Get Blockchain Member Operation Results"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Locations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/locations/checkNameAvailability/action"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Checks that resource name is valid and is not in use."),
		// 				Operation: to.Ptr("Check Name Availability"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Locations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/operations/read"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("List all Operations in Microsoft Blockchain Resource Provider."),
		// 				Operation: to.Ptr("List all Operations"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("Operations"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/providers/Microsoft.Insights/logDefinitions/read"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Gets the available logs for Microsoft Blockchain"),
		// 				Operation: to.Ptr("Read Microsoft Blockchain log definitions"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("The log definition of Microsoft Blockchain"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/providers/Microsoft.Insights/diagnosticSettings/read"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Gets the diagnostic setting for the resource"),
		// 				Operation: to.Ptr("Read diagnostic setting"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("The display resource of diagnostic settings of Microsoft Blockchain"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Blockchain/blockchainMembers/providers/Microsoft.Insights/diagnosticSettings/write"),
		// 			Display: &armblockchain.ResourceProviderOperationDisplay{
		// 				Description: to.Ptr("Creates or updates the diagnostic setting for the resource"),
		// 				Operation: to.Ptr("Write diagnostic setting"),
		// 				Provider: to.Ptr("Microsoft Blockchain"),
		// 				Resource: to.Ptr("The display resource of diagnostic settings of Microsoft Blockchain"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("system"),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// Collection of operation payload which is exposed in the response of the resource provider.
	ResourceProviderOperationCollection
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource Id of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the service - e.g. "Microsoft.Blockchain"
	Type *string
}

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.

func (*Resource) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceProviderOperation

type ResourceProviderOperation struct {
	// Gets or sets operation display
	Display *ResourceProviderOperationDisplay

	// Gets or sets a value indicating whether the operation is a data action or not.
	IsDataAction *bool

	// Gets or sets the operation name.
	Name *string

	// Gets or sets the origin.
	Origin *string
}

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

func (ResourceProviderOperation) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperation.

func (*ResourceProviderOperation) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperation.

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

	// Gets or sets the collection of operations.
	Value []*ResourceProviderOperation
}

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.

func (*ResourceProviderOperationCollection) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationCollection.

type ResourceProviderOperationDisplay

type ResourceProviderOperationDisplay struct {
	// Gets or sets the description of the provider for display purposes.
	Description *string

	// Gets or sets the name of the operation for display purposes.
	Operation *string

	// Gets or sets the name of the provider for display purposes.
	Provider *string

	// Gets or sets the name of the resource type for display purposes.
	Resource *string
}

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

func (ResourceProviderOperationDisplay) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationDisplay.

func (*ResourceProviderOperationDisplay) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationDisplay.

type ResourceTypeSKU

type ResourceTypeSKU struct {
	// Gets or sets the resource type
	ResourceType *string

	// Gets or sets the Skus
	SKUs []*SKUSetting
}

ResourceTypeSKU - Resource type Sku.

func (ResourceTypeSKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceTypeSKU.

func (*ResourceTypeSKU) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeSKU.

type ResourceTypeSKUCollection

type ResourceTypeSKUCollection struct {
	// Gets or sets the collection of resource type Sku.
	Value []*ResourceTypeSKU
}

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.

func (*ResourceTypeSKUCollection) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceTypeSKUCollection.

type SKU

type SKU struct {
	// Gets or sets Sku name
	Name *string

	// Gets or sets Sku tier
	Tier *string
}

SKU - Blockchain member Sku in payload

func (SKU) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUSetting

type SKUSetting struct {
	// Gets or sets the locations.
	Locations []*string

	// Gets or sets the Sku name.
	Name *string

	// Gets or sets the required features.
	RequiredFeatures []*string

	// Gets or sets the Sku tier.
	Tier *string
}

SKUSetting - Sku Setting.

func (SKUSetting) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUSetting.

func (*SKUSetting) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller 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, error)

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

  • subscriptionID - Gets the subscription Id which uniquely identifies the Microsoft Azure subscription. The subscription ID is part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SKUsClient) List

List - Lists the Skus of the resource type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSKUsClient().List(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ResourceTypeSKUCollection = armblockchain.ResourceTypeSKUCollection{
	// 	Value: []*armblockchain.ResourceTypeSKU{
	// 		{
	// 			ResourceType: to.Ptr("blockchainMembers"),
	// 			SKUs: []*armblockchain.SKUSetting{
	// 				{
	// 					Name: to.Ptr("B0"),
	// 					Locations: []*string{
	// 						to.Ptr("SoutheastAsia")},
	// 						RequiredFeatures: []*string{
	// 							to.Ptr("Microsoft.Blockchain/privatePreviewAccess")},
	// 							Tier: to.Ptr("Basic"),
	// 						},
	// 						{
	// 							Name: to.Ptr("S0"),
	// 							Locations: []*string{
	// 								to.Ptr("SoutheastAsia")},
	// 								RequiredFeatures: []*string{
	// 									to.Ptr("Microsoft.Blockchain/privatePreviewAccess")},
	// 									Tier: to.Ptr("Standard"),
	// 							}},
	// 					}},
	// 				}
}
Output:

type SKUsClientListOptions added in v0.2.0

type SKUsClientListOptions struct {
}

SKUsClientListOptions contains the optional parameters for the SKUsClient.List method.

type SKUsClientListResponse added in v0.2.0

type SKUsClientListResponse struct {
	// Collection of the resource type Sku.
	ResourceTypeSKUCollection
}

SKUsClientListResponse contains the response from method SKUsClient.List.

type TrackedResource

type TrackedResource struct {
	// The GEO location of the blockchain service.
	Location *string

	// Tags of the service which is a list of key value pairs that describes the resource.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource Id of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the service - e.g. "Microsoft.Blockchain"
	Type *string
}

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.

func (*TrackedResource) UnmarshalJSON added in v0.6.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type TransactionNode

type TransactionNode struct {
	// Gets or sets the transaction node location.
	Location *string

	// Gets or sets the blockchain member properties.
	Properties *TransactionNodeProperties

	// READ-ONLY; Fully qualified resource Id of the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; The type of the service - e.g. "Microsoft.Blockchain"
	Type *string
}

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.

func (*TransactionNode) UnmarshalJSON added in v0.6.0

func (t *TransactionNode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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

	// Gets or sets the collection of transaction nodes.
	Value []*TransactionNode
}

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.

func (*TransactionNodeCollection) UnmarshalJSON added in v0.6.0

func (t *TransactionNodeCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransactionNodeCollection.

type TransactionNodeProperties

type TransactionNodeProperties struct {
	// Gets or sets the firewall rules.
	FirewallRules []*FirewallRule

	// Sets the transaction node dns endpoint basic auth password.
	Password *string

	// READ-ONLY; Gets or sets the transaction node dns endpoint.
	DNS *string

	// READ-ONLY; Gets or sets the blockchain member provision state.
	ProvisioningState *NodeProvisioningState

	// READ-ONLY; Gets or sets the transaction node public key.
	PublicKey *string

	// READ-ONLY; Gets or sets the transaction node dns endpoint basic auth user name.
	UserName *string
}

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.

func (*TransactionNodeProperties) UnmarshalJSON added in v0.6.0

func (t *TransactionNodeProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransactionNodeProperties.

type TransactionNodePropertiesUpdate

type TransactionNodePropertiesUpdate struct {
	// Gets or sets the firewall rules.
	FirewallRules []*FirewallRule

	// Sets the transaction node dns endpoint basic auth password.
	Password *string
}

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.

func (*TransactionNodePropertiesUpdate) UnmarshalJSON added in v0.6.0

func (t *TransactionNodePropertiesUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransactionNodePropertiesUpdate.

type TransactionNodeUpdate

type TransactionNodeUpdate struct {
	// Gets or sets the transaction node update properties.
	Properties *TransactionNodePropertiesUpdate
}

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.

func (*TransactionNodeUpdate) UnmarshalJSON added in v0.6.0

func (t *TransactionNodeUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TransactionNodeUpdate.

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, error)

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

  • subscriptionID - Gets the subscription Id which uniquely identifies the Microsoft Azure subscription. The subscription ID is part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TransactionNodesClient) BeginCreate

func (client *TransactionNodesClient) BeginCreate(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesClientBeginCreateOptions) (*runtime.Poller[TransactionNodesClientCreateResponse], error)

BeginCreate - Create or update the transaction node. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • transactionNodeName - Transaction node name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - TransactionNodesClientBeginCreateOptions contains the optional parameters for the TransactionNodesClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_Create.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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTransactionNodesClient().BeginCreate(ctx, "contosemember1", "txnode2", "mygroup", &armblockchain.TransactionNodesClientBeginCreateOptions{TransactionNode: &armblockchain.TransactionNode{
		Location: to.Ptr("southeastasia"),
		Properties: &armblockchain.TransactionNodeProperties{
			Password: to.Ptr("<password>"),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TransactionNode = armblockchain.TransactionNode{
	// 	Name: to.Ptr("txnode2"),
	// 	Type: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes"),
	// 	ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1/transactionNodes/txnode2"),
	// 	Location: to.Ptr("southeastasia"),
	// 	Properties: &armblockchain.TransactionNodeProperties{
	// 		ProvisioningState: to.Ptr(armblockchain.NodeProvisioningStateSucceeded),
	// 		UserName: to.Ptr("txnode2"),
	// 	},
	// }
}
Output:

func (*TransactionNodesClient) BeginDelete

func (client *TransactionNodesClient) BeginDelete(ctx context.Context, blockchainMemberName string, transactionNodeName string, resourceGroupName string, options *TransactionNodesClientBeginDeleteOptions) (*runtime.Poller[TransactionNodesClientDeleteResponse], error)

BeginDelete - Delete the transaction node. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • transactionNodeName - Transaction node name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - TransactionNodesClientBeginDeleteOptions contains the optional parameters for the TransactionNodesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/blockchain/resource-manager/Microsoft.Blockchain/preview/2018-06-01-preview/examples/TransactionNodes_Delete.json

package main

import (
	"context"
	"log"

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

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

func (*TransactionNodesClient) Get

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

Get - Get the details of the transaction node. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • transactionNodeName - Transaction node name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - TransactionNodesClientGetOptions contains the optional parameters for the TransactionNodesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTransactionNodesClient().Get(ctx, "contosemember1", "txnode2", "mygroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TransactionNode = armblockchain.TransactionNode{
	// 	Name: to.Ptr("txnode2"),
	// 	Type: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes"),
	// 	ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1/transactionNodes/txnode2"),
	// 	Location: to.Ptr("southeastasia"),
	// 	Properties: &armblockchain.TransactionNodeProperties{
	// 		DNS: to.Ptr("txnode2-contosemember1.blockchain.ppe.azure-int.net"),
	// 		ProvisioningState: to.Ptr(armblockchain.NodeProvisioningStateSucceeded),
	// 		PublicKey: to.Ptr("h7Q10I/1dLK/hzX8FkVrfl03D/aX8jW3YNoxJ/n4vkY="),
	// 		UserName: to.Ptr("txnode2"),
	// 	},
	// }
}
Output:

func (*TransactionNodesClient) ListAPIKeys

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

ListAPIKeys - List the API keys for the transaction node. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • transactionNodeName - Transaction node name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - TransactionNodesClientListAPIKeysOptions contains the optional parameters for the TransactionNodesClient.ListAPIKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTransactionNodesClient().ListAPIKeys(ctx, "contosemember1", "txnode2", "mygroup", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.APIKeyCollection = armblockchain.APIKeyCollection{
	// 	Keys: []*armblockchain.APIKey{
	// 		{
	// 			KeyName: to.Ptr("key1"),
	// 			Value: to.Ptr("-EnIUzu29xj60xPJmstyCURo"),
	// 		},
	// 		{
	// 			KeyName: to.Ptr("key2"),
	// 			Value: to.Ptr("I8P-q4u_WDuCZUBYXnJ3yYX7"),
	// 	}},
	// }
}
Output:

func (*TransactionNodesClient) ListRegenerateAPIKeys

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

ListRegenerateAPIKeys - Regenerate the API keys for the blockchain member. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • transactionNodeName - Transaction node name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - TransactionNodesClientListRegenerateAPIKeysOptions contains the optional parameters for the TransactionNodesClient.ListRegenerateAPIKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTransactionNodesClient().ListRegenerateAPIKeys(ctx, "contosemember1", "txnode2", "mygroup", &armblockchain.TransactionNodesClientListRegenerateAPIKeysOptions{APIKey: &armblockchain.APIKey{
		KeyName: to.Ptr("key1"),
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.APIKeyCollection = armblockchain.APIKeyCollection{
	// 	Keys: []*armblockchain.APIKey{
	// 		{
	// 			KeyName: to.Ptr("key1"),
	// 			Value: to.Ptr("-EnIUzu29xj60xPJmstyCURo"),
	// 		},
	// 		{
	// 			KeyName: to.Ptr("key2"),
	// 			Value: to.Ptr("-EHio4yRJLxajDaxRNaoD7cZ"),
	// 	}},
	// }
}
Output:

func (*TransactionNodesClient) NewListPager added in v0.4.0

func (client *TransactionNodesClient) NewListPager(blockchainMemberName string, resourceGroupName string, options *TransactionNodesClientListOptions) *runtime.Pager[TransactionNodesClientListResponse]

NewListPager - Lists the transaction nodes for a blockchain member.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - TransactionNodesClientListOptions contains the optional parameters for the TransactionNodesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTransactionNodesClient().NewListPager("contosemember1", "mygroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TransactionNodeCollection = armblockchain.TransactionNodeCollection{
		// 	Value: []*armblockchain.TransactionNode{
		// 		{
		// 			Name: to.Ptr("txnode2"),
		// 			Type: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes"),
		// 			ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1/transactionNodes/txnode2"),
		// 			Location: to.Ptr("southeastasia"),
		// 			Properties: &armblockchain.TransactionNodeProperties{
		// 				DNS: to.Ptr("txnode2-contosemember1.blockchain.azure.com"),
		// 				ProvisioningState: to.Ptr(armblockchain.NodeProvisioningStateSucceeded),
		// 				PublicKey: to.Ptr("DbRYTorBtY7rZfNfByUQpdC+hD3k/0lfA7+UnH4ovWM="),
		// 				UserName: to.Ptr("txnode2"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*TransactionNodesClient) Update

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

Update - Update the transaction node. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2018-06-01-preview

  • blockchainMemberName - Blockchain member name.
  • transactionNodeName - Transaction node name.
  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - TransactionNodesClientUpdateOptions contains the optional parameters for the TransactionNodesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/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()
	clientFactory, err := armblockchain.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTransactionNodesClient().Update(ctx, "contosemember1", "txnode2", "mygroup", &armblockchain.TransactionNodesClientUpdateOptions{TransactionNode: &armblockchain.TransactionNodeUpdate{
		Properties: &armblockchain.TransactionNodePropertiesUpdate{
			Password: to.Ptr("<password>"),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TransactionNode = armblockchain.TransactionNode{
	// 	Name: to.Ptr("txnode2"),
	// 	Type: to.Ptr("Microsoft.Blockchain/blockchainMembers/transactionNodes"),
	// 	ID: to.Ptr("/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Blockchain/blockchainMembers/contosemember1/transactionNodes/txnode2"),
	// 	Location: to.Ptr("southeastasia"),
	// 	Properties: &armblockchain.TransactionNodeProperties{
	// 		DNS: to.Ptr("txnode1-contosemember1.blockchain.azure.com"),
	// 		ProvisioningState: to.Ptr(armblockchain.NodeProvisioningStateSucceeded),
	// 		PublicKey: to.Ptr("DbRYTorBtY7rZfNfByUQpdC+hD3k/0lfA7+UnH4ovWM="),
	// 		UserName: to.Ptr("txnode2"),
	// 	},
	// }
}
Output:

type TransactionNodesClientBeginCreateOptions added in v0.2.0

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

	// Payload to create the transaction node.
	TransactionNode *TransactionNode
}

TransactionNodesClientBeginCreateOptions contains the optional parameters for the TransactionNodesClient.BeginCreate method.

type TransactionNodesClientBeginDeleteOptions added in v0.2.0

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

TransactionNodesClientBeginDeleteOptions contains the optional parameters for the TransactionNodesClient.BeginDelete method.

type TransactionNodesClientCreateResponse added in v0.2.0

type TransactionNodesClientCreateResponse struct {
	// Payload of the transaction node which is the request/response of the resource provider.
	TransactionNode
}

TransactionNodesClientCreateResponse contains the response from method TransactionNodesClient.BeginCreate.

type TransactionNodesClientDeleteResponse added in v0.2.0

type TransactionNodesClientDeleteResponse struct {
}

TransactionNodesClientDeleteResponse contains the response from method TransactionNodesClient.BeginDelete.

type TransactionNodesClientGetOptions added in v0.2.0

type TransactionNodesClientGetOptions struct {
}

TransactionNodesClientGetOptions contains the optional parameters for the TransactionNodesClient.Get method.

type TransactionNodesClientGetResponse added in v0.2.0

type TransactionNodesClientGetResponse struct {
	// Payload of the transaction node which is the request/response of the resource provider.
	TransactionNode
}

TransactionNodesClientGetResponse contains the response from method TransactionNodesClient.Get.

type TransactionNodesClientListAPIKeysOptions added in v0.2.0

type TransactionNodesClientListAPIKeysOptions struct {
}

TransactionNodesClientListAPIKeysOptions contains the optional parameters for the TransactionNodesClient.ListAPIKeys method.

type TransactionNodesClientListAPIKeysResponse added in v0.2.0

type TransactionNodesClientListAPIKeysResponse struct {
	// Collection of the API key payload which is exposed in the response of the resource provider.
	APIKeyCollection
}

TransactionNodesClientListAPIKeysResponse contains the response from method TransactionNodesClient.ListAPIKeys.

type TransactionNodesClientListOptions added in v0.2.0

type TransactionNodesClientListOptions struct {
}

TransactionNodesClientListOptions contains the optional parameters for the TransactionNodesClient.NewListPager method.

type TransactionNodesClientListRegenerateAPIKeysOptions added in v0.2.0

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

TransactionNodesClientListRegenerateAPIKeysOptions contains the optional parameters for the TransactionNodesClient.ListRegenerateAPIKeys method.

type TransactionNodesClientListRegenerateAPIKeysResponse added in v0.2.0

type TransactionNodesClientListRegenerateAPIKeysResponse struct {
	// Collection of the API key payload which is exposed in the response of the resource provider.
	APIKeyCollection
}

TransactionNodesClientListRegenerateAPIKeysResponse contains the response from method TransactionNodesClient.ListRegenerateAPIKeys.

type TransactionNodesClientListResponse added in v0.2.0

type TransactionNodesClientListResponse struct {
	// Collection of transaction node payload which is exposed in the request/response of the resource provider.
	TransactionNodeCollection
}

TransactionNodesClientListResponse contains the response from method TransactionNodesClient.NewListPager.

type TransactionNodesClientUpdateOptions added in v0.2.0

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

TransactionNodesClientUpdateOptions contains the optional parameters for the TransactionNodesClient.Update method.

type TransactionNodesClientUpdateResponse added in v0.2.0

type TransactionNodesClientUpdateResponse struct {
	// Payload of the transaction node which is the request/response of the resource provider.
	TransactionNode
}

TransactionNodesClientUpdateResponse contains the response from method TransactionNodesClient.Update.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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