本文整理了Java中com.amazonaws.Request.addParameter
方法的一些代码示例,展示了Request.addParameter
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.addParameter
方法的具体详情如下:
包路径:com.amazonaws.Request
类名称:Request
方法名:addParameter
[英]Adds the specified request parameter to this request.
[中]将指定的请求参数添加到此请求。
代码示例来源:origin: aws/aws-sdk-java
public Request<ReleaseHostsRequest> marshall(ReleaseHostsRequest releaseHostsRequest) {
if (releaseHostsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<ReleaseHostsRequest> request = new DefaultRequest<ReleaseHostsRequest>(releaseHostsRequest, "AmazonEC2");
request.addParameter("Action", "ReleaseHosts");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> releaseHostsRequestHostIdsList = (com.amazonaws.internal.SdkInternalList<String>) releaseHostsRequest
.getHostIds();
if (!releaseHostsRequestHostIdsList.isEmpty() || !releaseHostsRequestHostIdsList.isAutoConstruct()) {
int hostIdsListIndex = 1;
for (String releaseHostsRequestHostIdsListValue : releaseHostsRequestHostIdsList) {
if (releaseHostsRequestHostIdsListValue != null) {
request.addParameter("HostId." + hostIdsListIndex, StringUtils.fromString(releaseHostsRequestHostIdsListValue));
}
hostIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<CancelExportTaskRequest> marshall(CancelExportTaskRequest cancelExportTaskRequest) {
if (cancelExportTaskRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<CancelExportTaskRequest> request = new DefaultRequest<CancelExportTaskRequest>(cancelExportTaskRequest, "AmazonEC2");
request.addParameter("Action", "CancelExportTask");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
if (cancelExportTaskRequest.getExportTaskId() != null) {
request.addParameter("ExportTaskId", StringUtils.fromString(cancelExportTaskRequest.getExportTaskId()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeleteLoginProfileRequest> marshall(DeleteLoginProfileRequest deleteLoginProfileRequest) {
if (deleteLoginProfileRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeleteLoginProfileRequest> request = new DefaultRequest<DeleteLoginProfileRequest>(deleteLoginProfileRequest, "AmazonIdentityManagement");
request.addParameter("Action", "DeleteLoginProfile");
request.addParameter("Version", "2010-05-08");
request.setHttpMethod(HttpMethodName.POST);
if (deleteLoginProfileRequest.getUserName() != null) {
request.addParameter("UserName", StringUtils.fromString(deleteLoginProfileRequest.getUserName()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<TerminateInstancesRequest> marshall(TerminateInstancesRequest terminateInstancesRequest) {
if (terminateInstancesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<TerminateInstancesRequest> request = new DefaultRequest<TerminateInstancesRequest>(terminateInstancesRequest, "AmazonEC2");
request.addParameter("Action", "TerminateInstances");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> terminateInstancesRequestInstanceIdsList = (com.amazonaws.internal.SdkInternalList<String>) terminateInstancesRequest
.getInstanceIds();
if (!terminateInstancesRequestInstanceIdsList.isEmpty() || !terminateInstancesRequestInstanceIdsList.isAutoConstruct()) {
int instanceIdsListIndex = 1;
for (String terminateInstancesRequestInstanceIdsListValue : terminateInstancesRequestInstanceIdsList) {
if (terminateInstancesRequestInstanceIdsListValue != null) {
request.addParameter("InstanceId." + instanceIdsListIndex, StringUtils.fromString(terminateInstancesRequestInstanceIdsListValue));
}
instanceIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeleteGlobalClusterRequest> marshall(DeleteGlobalClusterRequest deleteGlobalClusterRequest) {
if (deleteGlobalClusterRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeleteGlobalClusterRequest> request = new DefaultRequest<DeleteGlobalClusterRequest>(deleteGlobalClusterRequest, "AmazonRDS");
request.addParameter("Action", "DeleteGlobalCluster");
request.addParameter("Version", "2014-10-31");
request.setHttpMethod(HttpMethodName.POST);
if (deleteGlobalClusterRequest.getGlobalClusterIdentifier() != null) {
request.addParameter("GlobalClusterIdentifier", StringUtils.fromString(deleteGlobalClusterRequest.getGlobalClusterIdentifier()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeleteFlowLogsRequest> marshall(DeleteFlowLogsRequest deleteFlowLogsRequest) {
if (deleteFlowLogsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeleteFlowLogsRequest> request = new DefaultRequest<DeleteFlowLogsRequest>(deleteFlowLogsRequest, "AmazonEC2");
request.addParameter("Action", "DeleteFlowLogs");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> deleteFlowLogsRequestFlowLogIdsList = (com.amazonaws.internal.SdkInternalList<String>) deleteFlowLogsRequest
.getFlowLogIds();
if (!deleteFlowLogsRequestFlowLogIdsList.isEmpty() || !deleteFlowLogsRequestFlowLogIdsList.isAutoConstruct()) {
int flowLogIdsListIndex = 1;
for (String deleteFlowLogsRequestFlowLogIdsListValue : deleteFlowLogsRequestFlowLogIdsList) {
if (deleteFlowLogsRequestFlowLogIdsListValue != null) {
request.addParameter("FlowLogId." + flowLogIdsListIndex, StringUtils.fromString(deleteFlowLogsRequestFlowLogIdsListValue));
}
flowLogIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeleteDBClusterEndpointRequest> marshall(DeleteDBClusterEndpointRequest deleteDBClusterEndpointRequest) {
if (deleteDBClusterEndpointRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeleteDBClusterEndpointRequest> request = new DefaultRequest<DeleteDBClusterEndpointRequest>(deleteDBClusterEndpointRequest, "AmazonRDS");
request.addParameter("Action", "DeleteDBClusterEndpoint");
request.addParameter("Version", "2014-10-31");
request.setHttpMethod(HttpMethodName.POST);
if (deleteDBClusterEndpointRequest.getDBClusterEndpointIdentifier() != null) {
request.addParameter("DBClusterEndpointIdentifier", StringUtils.fromString(deleteDBClusterEndpointRequest.getDBClusterEndpointIdentifier()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<UnmonitorInstancesRequest> marshall(UnmonitorInstancesRequest unmonitorInstancesRequest) {
if (unmonitorInstancesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<UnmonitorInstancesRequest> request = new DefaultRequest<UnmonitorInstancesRequest>(unmonitorInstancesRequest, "AmazonEC2");
request.addParameter("Action", "UnmonitorInstances");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> unmonitorInstancesRequestInstanceIdsList = (com.amazonaws.internal.SdkInternalList<String>) unmonitorInstancesRequest
.getInstanceIds();
if (!unmonitorInstancesRequestInstanceIdsList.isEmpty() || !unmonitorInstancesRequestInstanceIdsList.isAutoConstruct()) {
int instanceIdsListIndex = 1;
for (String unmonitorInstancesRequestInstanceIdsListValue : unmonitorInstancesRequestInstanceIdsList) {
if (unmonitorInstancesRequestInstanceIdsListValue != null) {
request.addParameter("InstanceId." + instanceIdsListIndex, StringUtils.fromString(unmonitorInstancesRequestInstanceIdsListValue));
}
instanceIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeleteDBParameterGroupRequest> marshall(DeleteDBParameterGroupRequest deleteDBParameterGroupRequest) {
if (deleteDBParameterGroupRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeleteDBParameterGroupRequest> request = new DefaultRequest<DeleteDBParameterGroupRequest>(deleteDBParameterGroupRequest, "AmazonNeptune");
request.addParameter("Action", "DeleteDBParameterGroup");
request.addParameter("Version", "2014-10-31");
request.setHttpMethod(HttpMethodName.POST);
if (deleteDBParameterGroupRequest.getDBParameterGroupName() != null) {
request.addParameter("DBParameterGroupName", StringUtils.fromString(deleteDBParameterGroupRequest.getDBParameterGroupName()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<RebootInstancesRequest> marshall(RebootInstancesRequest rebootInstancesRequest) {
if (rebootInstancesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<RebootInstancesRequest> request = new DefaultRequest<RebootInstancesRequest>(rebootInstancesRequest, "AmazonEC2");
request.addParameter("Action", "RebootInstances");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> rebootInstancesRequestInstanceIdsList = (com.amazonaws.internal.SdkInternalList<String>) rebootInstancesRequest
.getInstanceIds();
if (!rebootInstancesRequestInstanceIdsList.isEmpty() || !rebootInstancesRequestInstanceIdsList.isAutoConstruct()) {
int instanceIdsListIndex = 1;
for (String rebootInstancesRequestInstanceIdsListValue : rebootInstancesRequestInstanceIdsList) {
if (rebootInstancesRequestInstanceIdsListValue != null) {
request.addParameter("InstanceId." + instanceIdsListIndex, StringUtils.fromString(rebootInstancesRequestInstanceIdsListValue));
}
instanceIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<GetLoginProfileRequest> marshall(GetLoginProfileRequest getLoginProfileRequest) {
if (getLoginProfileRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<GetLoginProfileRequest> request = new DefaultRequest<GetLoginProfileRequest>(getLoginProfileRequest, "AmazonIdentityManagement");
request.addParameter("Action", "GetLoginProfile");
request.addParameter("Version", "2010-05-08");
request.setHttpMethod(HttpMethodName.POST);
if (getLoginProfileRequest.getUserName() != null) {
request.addParameter("UserName", StringUtils.fromString(getLoginProfileRequest.getUserName()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DescribeExportTasksRequest> marshall(DescribeExportTasksRequest describeExportTasksRequest) {
if (describeExportTasksRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DescribeExportTasksRequest> request = new DefaultRequest<DescribeExportTasksRequest>(describeExportTasksRequest, "AmazonEC2");
request.addParameter("Action", "DescribeExportTasks");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> describeExportTasksRequestExportTaskIdsList = (com.amazonaws.internal.SdkInternalList<String>) describeExportTasksRequest
.getExportTaskIds();
if (!describeExportTasksRequestExportTaskIdsList.isEmpty() || !describeExportTasksRequestExportTaskIdsList.isAutoConstruct()) {
int exportTaskIdsListIndex = 1;
for (String describeExportTasksRequestExportTaskIdsListValue : describeExportTasksRequestExportTaskIdsList) {
if (describeExportTasksRequestExportTaskIdsListValue != null) {
request.addParameter("ExportTaskId." + exportTaskIdsListIndex, StringUtils.fromString(describeExportTasksRequestExportTaskIdsListValue));
}
exportTaskIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeletePlatformApplicationRequest> marshall(DeletePlatformApplicationRequest deletePlatformApplicationRequest) {
if (deletePlatformApplicationRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeletePlatformApplicationRequest> request = new DefaultRequest<DeletePlatformApplicationRequest>(deletePlatformApplicationRequest, "AmazonSNS");
request.addParameter("Action", "DeletePlatformApplication");
request.addParameter("Version", "2010-03-31");
request.setHttpMethod(HttpMethodName.POST);
if (deletePlatformApplicationRequest.getPlatformApplicationArn() != null) {
request.addParameter("PlatformApplicationArn", StringUtils.fromString(deletePlatformApplicationRequest.getPlatformApplicationArn()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<MonitorInstancesRequest> marshall(MonitorInstancesRequest monitorInstancesRequest) {
if (monitorInstancesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<MonitorInstancesRequest> request = new DefaultRequest<MonitorInstancesRequest>(monitorInstancesRequest, "AmazonEC2");
request.addParameter("Action", "MonitorInstances");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> monitorInstancesRequestInstanceIdsList = (com.amazonaws.internal.SdkInternalList<String>) monitorInstancesRequest
.getInstanceIds();
if (!monitorInstancesRequestInstanceIdsList.isEmpty() || !monitorInstancesRequestInstanceIdsList.isAutoConstruct()) {
int instanceIdsListIndex = 1;
for (String monitorInstancesRequestInstanceIdsListValue : monitorInstancesRequestInstanceIdsList) {
if (monitorInstancesRequestInstanceIdsListValue != null) {
request.addParameter("InstanceId." + instanceIdsListIndex, StringUtils.fromString(monitorInstancesRequestInstanceIdsListValue));
}
instanceIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<GetSubscriptionAttributesRequest> marshall(GetSubscriptionAttributesRequest getSubscriptionAttributesRequest) {
if (getSubscriptionAttributesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<GetSubscriptionAttributesRequest> request = new DefaultRequest<GetSubscriptionAttributesRequest>(getSubscriptionAttributesRequest, "AmazonSNS");
request.addParameter("Action", "GetSubscriptionAttributes");
request.addParameter("Version", "2010-03-31");
request.setHttpMethod(HttpMethodName.POST);
if (getSubscriptionAttributesRequest.getSubscriptionArn() != null) {
request.addParameter("SubscriptionArn", StringUtils.fromString(getSubscriptionAttributesRequest.getSubscriptionArn()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeleteVpcEndpointsRequest> marshall(DeleteVpcEndpointsRequest deleteVpcEndpointsRequest) {
if (deleteVpcEndpointsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeleteVpcEndpointsRequest> request = new DefaultRequest<DeleteVpcEndpointsRequest>(deleteVpcEndpointsRequest, "AmazonEC2");
request.addParameter("Action", "DeleteVpcEndpoints");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> deleteVpcEndpointsRequestVpcEndpointIdsList = (com.amazonaws.internal.SdkInternalList<String>) deleteVpcEndpointsRequest
.getVpcEndpointIds();
if (!deleteVpcEndpointsRequestVpcEndpointIdsList.isEmpty() || !deleteVpcEndpointsRequestVpcEndpointIdsList.isAutoConstruct()) {
int vpcEndpointIdsListIndex = 1;
for (String deleteVpcEndpointsRequestVpcEndpointIdsListValue : deleteVpcEndpointsRequestVpcEndpointIdsList) {
if (deleteVpcEndpointsRequestVpcEndpointIdsListValue != null) {
request.addParameter("VpcEndpointId." + vpcEndpointIdsListIndex, StringUtils.fromString(deleteVpcEndpointsRequestVpcEndpointIdsListValue));
}
vpcEndpointIdsListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DescribeStackSetRequest> marshall(DescribeStackSetRequest describeStackSetRequest) {
if (describeStackSetRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DescribeStackSetRequest> request = new DefaultRequest<DescribeStackSetRequest>(describeStackSetRequest, "AmazonCloudFormation");
request.addParameter("Action", "DescribeStackSet");
request.addParameter("Version", "2010-05-15");
request.setHttpMethod(HttpMethodName.POST);
if (describeStackSetRequest.getStackSetName() != null) {
request.addParameter("StackSetName", StringUtils.fromString(describeStackSetRequest.getStackSetName()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DescribeAccountAttributesRequest> marshall(DescribeAccountAttributesRequest describeAccountAttributesRequest) {
if (describeAccountAttributesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DescribeAccountAttributesRequest> request = new DefaultRequest<DescribeAccountAttributesRequest>(describeAccountAttributesRequest, "AmazonEC2");
request.addParameter("Action", "DescribeAccountAttributes");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> describeAccountAttributesRequestAttributeNamesList = (com.amazonaws.internal.SdkInternalList<String>) describeAccountAttributesRequest
.getAttributeNames();
if (!describeAccountAttributesRequestAttributeNamesList.isEmpty() || !describeAccountAttributesRequestAttributeNamesList.isAutoConstruct()) {
int attributeNamesListIndex = 1;
for (String describeAccountAttributesRequestAttributeNamesListValue : describeAccountAttributesRequestAttributeNamesList) {
if (describeAccountAttributesRequestAttributeNamesListValue != null) {
request.addParameter("AttributeName." + attributeNamesListIndex,
StringUtils.fromString(describeAccountAttributesRequestAttributeNamesListValue));
}
attributeNamesListIndex++;
}
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DeleteFpgaImageRequest> marshall(DeleteFpgaImageRequest deleteFpgaImageRequest) {
if (deleteFpgaImageRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DeleteFpgaImageRequest> request = new DefaultRequest<DeleteFpgaImageRequest>(deleteFpgaImageRequest, "AmazonEC2");
request.addParameter("Action", "DeleteFpgaImage");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
if (deleteFpgaImageRequest.getFpgaImageId() != null) {
request.addParameter("FpgaImageId", StringUtils.fromString(deleteFpgaImageRequest.getFpgaImageId()));
}
return request;
}
代码示例来源:origin: aws/aws-sdk-java
public Request<DescribeConversionTasksRequest> marshall(DescribeConversionTasksRequest describeConversionTasksRequest) {
if (describeConversionTasksRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
Request<DescribeConversionTasksRequest> request = new DefaultRequest<DescribeConversionTasksRequest>(describeConversionTasksRequest, "AmazonEC2");
request.addParameter("Action", "DescribeConversionTasks");
request.addParameter("Version", "2016-11-15");
request.setHttpMethod(HttpMethodName.POST);
com.amazonaws.internal.SdkInternalList<String> describeConversionTasksRequestConversionTaskIdsList = (com.amazonaws.internal.SdkInternalList<String>) describeConversionTasksRequest
.getConversionTaskIds();
if (!describeConversionTasksRequestConversionTaskIdsList.isEmpty() || !describeConversionTasksRequestConversionTaskIdsList.isAutoConstruct()) {
int conversionTaskIdsListIndex = 1;
for (String describeConversionTasksRequestConversionTaskIdsListValue : describeConversionTasksRequestConversionTaskIdsList) {
if (describeConversionTasksRequestConversionTaskIdsListValue != null) {
request.addParameter("ConversionTaskId." + conversionTaskIdsListIndex,
StringUtils.fromString(describeConversionTasksRequestConversionTaskIdsListValue));
}
conversionTaskIdsListIndex++;
}
}
return request;
}
内容来源于网络,如有侵权,请联系作者删除!