AWS::ManagedBlockchain::Member - AWS CloudFormation
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

AWS::ManagedBlockchain::Member

在 Managed Blockchain 网络中创建一个成员。

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

{ "Type" : "AWS::ManagedBlockchain::Member", "Properties" : { "InvitationId" : String, "MemberConfiguration" : MemberConfiguration, "NetworkConfiguration" : NetworkConfiguration, "NetworkId" : String } }

YAML

Type: AWS::ManagedBlockchain::Member Properties: InvitationId: String MemberConfiguration: MemberConfiguration NetworkConfiguration: NetworkConfiguration NetworkId: String

属性

InvitationId

发送到创建成员的账户的加入网络邀请的唯一标识符。

必需:否

类型:字符串

最低1

最高32

Update requires: No interruption

MemberConfiguration

成员的配置属性。

必需:是

类型MemberConfiguration

Update requires: No interruption

NetworkConfiguration

成员所属的网络的配置属性。

必需:否

类型NetworkConfiguration

Update requires: No interruption

NetworkId

成员所属网络的唯一标识符。

必需:否

类型:字符串

Update requires: No interruption

返回值

Ref

在将此资源的逻辑 ID 传递给内部 Ref 函数时,Ref 返回 成员 ID。

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt 内部函数返回此类型的一个指定属性的值。以下为可用属性和示例返回值。

有关使用 Fn::GetAtt 内部函数的更多信息,请参阅 Fn::GetAtt

MemberId

成员的唯一标识符。

NetworkId

成员所属网络的唯一标识符。

示例

创建新的 Managed Blockchain 网络及其第一个成员

在 Managed Blockchain 网络中创建第一个成员时,还要指定参数来创建网络。

JSON

{ "Description": "Basic Initial Member template", "Parameters": { "MemberName": { "Type": "String" }, "MemberDescription": { "Type": "String" }, "MemberAdminUsername": { "Type": "String" }, "MemberAdminPassword": { "Type": "String" }, "NetworkName": { "Type": "String" }, "NetworkDescription": { "Type": "String" }, "Edition": { "Type": "String" }, "ThresholdPercentage": { "Type": "Number" }, "ThresholdComparator": { "Type": "String" }, "ProposalDurationInHours": { "Type": "Number" } }, "Resources": { "Member": { "Type": "AWS::ManagedBlockchain::Member", "Properties": { "NetworkConfiguration": { "Name": "NetworkName", "Description": "NetworkDescription", "Framework": "HYPERLEDGER_FABRIC", "FrameworkVersion": "1.2", "NetworkFrameworkConfiguration": { "NetworkFabricConfiguration": { "Edition": "Edition" } }, "VotingPolicy": { "ApprovalThresholdPolicy": { "ThresholdPercentage": "ThresholdPercentage", "ProposalDurationInHours": "ProposalDurationInHours", "ThresholdComparator": "ThresholdComparator" } } }, "MemberConfiguration": { "Name": "MemberName", "Description": "MemberDescription", "MemberFrameworkConfiguration": { "MemberFabricConfiguration": { "AdminUsername": "MemberAdminUsername", "AdminPassword": "MemberAdminPassword" } } } } } } }

YAML

Description: "Basic Initial Member template" Parameters: MemberName: Type: String MemberDescription: Type: String MemberAdminUsername: Type: String MemberAdminPassword: Type: String NetworkName: Type: String NetworkDescription: Type: String Edition: Type: String ThresholdPercentage: Type: Number ThresholdComparator: Type: String ProposalDurationInHours: Type: Number Resources: Member: Type: "AWS::ManagedBlockchain::Member" Properties: NetworkConfiguration: Name: !Ref NetworkName Description: !Ref NetworkDescription Framework: "HYPERLEDGER_FABRIC" FrameworkVersion: "1.2" NetworkFrameworkConfiguration: NetworkFabricConfiguration: Edition: !Ref Edition VotingPolicy: ApprovalThresholdPolicy: ThresholdPercentage: !Ref ThresholdPercentage ProposalDurationInHours: !Ref ProposalDurationInHours ThresholdComparator: !Ref ThresholdComparator MemberConfiguration: Name: !Ref MemberName Description: !Ref MemberDescription MemberFrameworkConfiguration: MemberFabricConfiguration: AdminUsername: !Ref MemberAdminUsername AdminPassword: !Ref MemberAdminPassword

在现有网络中创建一个额外成员

YAML

Description: Basic Secondary Member template Parameters: MemberName: Type: String MemberDescription: Type: String MemberAdminUsername: Type: String MemberAdminPassword: Type: String NetworkId: Type: String InvitationId: Type: String Resources: Member: Type: 'AWS::ManagedBlockchain::Member' Properties: MemberConfiguration: Name: !Ref MemberName Description: !Ref MemberDescription MemberFrameworkConfiguration: MemberFabricConfiguration: AdminUsername: !Ref MemberAdminUsername AdminPassword: !Ref MemberAdminPassword NetworkId: !Ref NetworkId InvitationId: !Ref InvitationId

JSON

{ "Description": "Basic Additional Member template", "Parameters": { "MemberName": { "Type": "String" }, "MemberDescription": { "Type": "String" }, "MemberAdminUsername": { "Type": "String" }, "MemberAdminPassword": { "Type": "String" }, "NetworkId": { "Type": "String" }, "InvitationId": { "Type": "String" } }, "Resources": { "Member": { "Type": "AWS::ManagedBlockchain::Member", "Properties": { "MemberConfiguration": { "Name": { "Ref": "MemberName" }, "MemberFrameworkConfiguration": { "MemberFabricConfiguration": { "AdminUsername": { "Ref": "MemberAdminUsername" }, "AdminPassword": { "Ref": "MemberAdminPassword" } } } }, "NetworkId": { "Ref": "NetworkId" }, "InvitationId": { "Ref": "InvitationId" } } } } }