MANAGEDBLOCKCHAIN

CreateAccessor

enum_AccessorNetworkType := [ "ETHEREUM_GOERLI", "ETHEREUM_MAINNET", "ETHEREUM_MAINNET_AND_GOERLI", "POLYGON_MAINNET", "POLYGON_MUMBAI" ]
enum_AccessorType := [ "BILLING_TOKEN" ]

valid {
    input.Body.ClientRequestToken == STRING
    input.Body.AccessorType == enum_AccessorType[_]
    input.Body.Tags.STRING == STRING
    input.Body.NetworkType == enum_AccessorNetworkType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateMember

valid {
    input.Body.ClientRequestToken == STRING
    input.Body.InvitationId == STRING
    input.Body.MemberConfiguration.Name == STRING
    input.Body.MemberConfiguration.Description == STRING
    input.Body.MemberConfiguration.FrameworkConfiguration.Fabric.AdminUsername == STRING
    input.Body.MemberConfiguration.FrameworkConfiguration.Fabric.AdminPassword == STRING
    input.Body.MemberConfiguration.LogPublishingConfiguration.Fabric.CaLogs.Cloudwatch.Enabled == BOOLEAN
    input.Body.MemberConfiguration.Tags.STRING == STRING
    input.Body.MemberConfiguration.KmsKeyArn == STRING
    input.ReqMap.networkId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateNetwork

enum_Edition := [ "STARTER", "STANDARD" ]
enum_Framework := [ "HYPERLEDGER_FABRIC", "ETHEREUM" ]
enum_ThresholdComparator := [ "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO" ]

valid {
    input.Body.ClientRequestToken == STRING
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.Framework == enum_Framework[_]
    input.Body.FrameworkVersion == STRING
    input.Body.FrameworkConfiguration.Fabric.Edition == enum_Edition[_]
    input.Body.VotingPolicy.ApprovalThresholdPolicy.ThresholdPercentage == INTEGER
    input.Body.VotingPolicy.ApprovalThresholdPolicy.ProposalDurationInHours == INTEGER
    input.Body.VotingPolicy.ApprovalThresholdPolicy.ThresholdComparator == enum_ThresholdComparator[_]
    input.Body.MemberConfiguration.Name == STRING
    input.Body.MemberConfiguration.Description == STRING
    input.Body.MemberConfiguration.FrameworkConfiguration.Fabric.AdminUsername == STRING
    input.Body.MemberConfiguration.FrameworkConfiguration.Fabric.AdminPassword == STRING
    input.Body.MemberConfiguration.LogPublishingConfiguration.Fabric.CaLogs.Cloudwatch.Enabled == BOOLEAN
    input.Body.MemberConfiguration.Tags.STRING == STRING
    input.Body.MemberConfiguration.KmsKeyArn == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateNode

enum_StateDBType := [ "LevelDB", "CouchDB" ]

valid {
    input.Body.ClientRequestToken == STRING
    input.Body.MemberId == STRING
    input.Body.NodeConfiguration.InstanceType == STRING
    input.Body.NodeConfiguration.AvailabilityZone == STRING
    input.Body.NodeConfiguration.LogPublishingConfiguration.Fabric.ChaincodeLogs.Cloudwatch.Enabled == BOOLEAN
    input.Body.NodeConfiguration.LogPublishingConfiguration.Fabric.PeerLogs.Cloudwatch.Enabled == BOOLEAN
    input.Body.NodeConfiguration.StateDB == enum_StateDBType[_]
    input.Body.Tags.STRING == STRING
    input.ReqMap.networkId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateProposal

valid {
    input.Body.ClientRequestToken == STRING
    input.Body.MemberId == STRING
    input.Body.Actions.Invitations[_].Principal == STRING
    input.Body.Actions.Removals[_].MemberId == STRING
    input.Body.Description == STRING
    input.Body.Tags.STRING == STRING
    input.ReqMap.networkId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteAccessor

valid {
    input.ReqMap.AccessorId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteMember

valid {
    input.ReqMap.networkId == STRING
    input.ReqMap.memberId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteNode

valid {
    input.ReqMap.networkId == STRING
    input.ReqMap.nodeId == STRING
    input.Qs.memberId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetAccessor

valid {
    input.ReqMap.AccessorId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetMember

valid {
    input.ReqMap.networkId == STRING
    input.ReqMap.memberId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetNetwork

valid {
    input.ReqMap.networkId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetNode

valid {
    input.ReqMap.networkId == STRING
    input.ReqMap.nodeId == STRING
    input.Qs.memberId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetProposal

valid {
    input.ReqMap.networkId == STRING
    input.ReqMap.proposalId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListAccessors

enum_AccessorNetworkType := [ "ETHEREUM_GOERLI", "ETHEREUM_MAINNET", "ETHEREUM_MAINNET_AND_GOERLI", "POLYGON_MAINNET", "POLYGON_MUMBAI" ]

valid {
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.networkType == enum_AccessorNetworkType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListInvitations

valid {
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListMembers

enum_MemberStatus := [ "CREATING", "AVAILABLE", "CREATE_FAILED", "UPDATING", "DELETING", "DELETED", "INACCESSIBLE_ENCRYPTION_KEY" ]

valid {
    input.ReqMap.networkId == STRING
    input.Qs.name == STRING
    input.Qs.status == enum_MemberStatus[_]
    input.Qs.isOwned == BOOLEAN
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListNetworks

enum_Framework := [ "HYPERLEDGER_FABRIC", "ETHEREUM" ]
enum_NetworkStatus := [ "CREATING", "AVAILABLE", "CREATE_FAILED", "DELETING", "DELETED" ]

valid {
    input.Qs.name == STRING
    input.Qs.framework == enum_Framework[_]
    input.Qs.status == enum_NetworkStatus[_]
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListNodes

enum_NodeStatus := [ "CREATING", "AVAILABLE", "UNHEALTHY", "CREATE_FAILED", "UPDATING", "DELETING", "DELETED", "FAILED", "INACCESSIBLE_ENCRYPTION_KEY" ]

valid {
    input.ReqMap.networkId == STRING
    input.Qs.memberId == STRING
    input.Qs.status == enum_NodeStatus[_]
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListProposalVotes

valid {
    input.ReqMap.networkId == STRING
    input.ReqMap.proposalId == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListProposals

valid {
    input.ReqMap.networkId == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.ReqMap.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RejectInvitation

valid {
    input.ReqMap.invitationId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.Tags.STRING == STRING
    input.ReqMap.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.ReqMap.resourceArn == STRING
    input.Qs.tagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateMember

valid {
    input.Body.LogPublishingConfiguration.Fabric.CaLogs.Cloudwatch.Enabled == BOOLEAN
    input.ReqMap.networkId == STRING
    input.ReqMap.memberId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateNode

valid {
    input.Body.MemberId == STRING
    input.Body.LogPublishingConfiguration.Fabric.ChaincodeLogs.Cloudwatch.Enabled == BOOLEAN
    input.Body.LogPublishingConfiguration.Fabric.PeerLogs.Cloudwatch.Enabled == BOOLEAN
    input.ReqMap.networkId == STRING
    input.ReqMap.nodeId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

VoteOnProposal

enum_VoteValue := [ "YES", "NO" ]

valid {
    input.Body.VoterMemberId == STRING
    input.Body.Vote == enum_VoteValue[_]
    input.ReqMap.networkId == STRING
    input.ReqMap.proposalId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}