Casts a vote for a specified ProposalId on behalf of a member. The member to vote as, specified by VoterMemberId, must be in the same Amazon Web Services account as the principal that calls the action.
Applies only to Hyperledger Fabric.
Parameters:
Raises:
-
AccessDeniedException
–
You don't have sufficient access to perform this action.
-
IllegalActionException
–
-
InternalServiceErrorException
–
The request processing has failed because of an unknown error, exception or failure.
-
InvalidRequestException
–
The action or operation requested is invalid. Verify that the action is typed correctly.
-
ResourceNotFoundException
–
A requested resource doesn't exist. It may have been deleted or referenced incorrectly.
-
ThrottlingException
–
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is creating resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources if possible.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_managedblockchain/_services/managed_blockchain.py
| def vote_on_proposal(
self,
network_id: "capo_managedblockchain.types.resource_id_string.ResourceIdString",
proposal_id: "capo_managedblockchain.types.resource_id_string.ResourceIdString",
voter_member_id: "capo_managedblockchain.types.resource_id_string.ResourceIdString",
vote: "capo_managedblockchain.types.vote_value.VoteValue",
*,
config_overrides: Optional[ManagedBlockchainClientConfig] = None,
) -> "capo_managedblockchain.types.vote_on_proposal_output.VoteOnProposalOutput":
"""<p>Casts a vote for a specified <code>ProposalId</code> on behalf of a member. The member to vote as, specified by <code>VoterMemberId</code>, must be in the same Amazon Web Services account as the principal that calls the action.</p> <p>Applies only to Hyperledger Fabric.</p>
Args:
network_id: <p> The unique identifier of the network. </p>
proposal_id: <p> The unique identifier of the proposal. </p>
voter_member_id: <p>The unique identifier of the member casting the vote. </p>
vote: <p> The value of the vote. </p>
Raises:
capo_managedblockchain.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
capo_managedblockchain.errors.illegal_action_exception.IllegalActionException: <p></p>
capo_managedblockchain.errors.internal_service_error_exception.InternalServiceErrorException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_managedblockchain.errors.invalid_request_exception.InvalidRequestException: <p>The action or operation requested is invalid. Verify that the action is typed correctly.</p>
capo_managedblockchain.errors.resource_not_found_exception.ResourceNotFoundException: <p>A requested resource doesn't exist. It may have been deleted or referenced incorrectly.</p>
capo_managedblockchain.errors.throttling_exception.ThrottlingException: <p>The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is creating resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources if possible.</p>
capo_managedblockchain.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_managedblockchain.types.vote_on_proposal_input.VoteOnProposalInput]",
) -> OperationResponse[
"capo_managedblockchain.types.vote_on_proposal_output.VoteOnProposalOutput"
]:
import capo_managedblockchain._operations.taiga_web_service.vote_on_proposal
output, http_response = (
capo_managedblockchain._operations.taiga_web_service.vote_on_proposal.vote_on_proposal(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("VoteOnProposal")
)
input_: capo_managedblockchain.types.vote_on_proposal_input.VoteOnProposalInput = {
"network_id": network_id,
"proposal_id": proposal_id,
"voter_member_id": voter_member_id,
"vote": vote,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|