idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
13,500 | public void setItem ( java . util . Collection < ExportJobResponse > item ) { if ( item == null ) { this . item = null ; return ; } this . item = new java . util . ArrayList < ExportJobResponse > ( item ) ; } | A list of export jobs for the application . |
13,501 | public java . util . concurrent . Future < GetHealthCheckCountResult > getHealthCheckCountAsync ( com . amazonaws . handlers . AsyncHandler < GetHealthCheckCountRequest , GetHealthCheckCountResult > asyncHandler ) { return getHealthCheckCountAsync ( new GetHealthCheckCountRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the GetHealthCheckCount operation with an AsyncHandler . |
13,502 | public java . util . concurrent . Future < ListHostedZonesResult > listHostedZonesAsync ( com . amazonaws . handlers . AsyncHandler < ListHostedZonesRequest , ListHostedZonesResult > asyncHandler ) { return listHostedZonesAsync ( new ListHostedZonesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListHostedZones operation with an AsyncHandler . |
13,503 | public java . util . concurrent . Future < ListTrafficPolicyInstancesResult > listTrafficPolicyInstancesAsync ( com . amazonaws . handlers . AsyncHandler < ListTrafficPolicyInstancesRequest , ListTrafficPolicyInstancesResult > asyncHandler ) { return listTrafficPolicyInstancesAsync ( new ListTrafficPolicyInstancesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListTrafficPolicyInstances operation with an AsyncHandler . |
13,504 | public java . util . concurrent . Future < DescribeMetricCollectionTypesResult > describeMetricCollectionTypesAsync ( com . amazonaws . handlers . AsyncHandler < DescribeMetricCollectionTypesRequest , DescribeMetricCollectionTypesResult > asyncHandler ) { return describeMetricCollectionTypesAsync ( new DescribeMetricCollectionTypesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the DescribeMetricCollectionTypes operation with an AsyncHandler . |
13,505 | public java . util . concurrent . Future < DescribePoliciesResult > describePoliciesAsync ( com . amazonaws . handlers . AsyncHandler < DescribePoliciesRequest , DescribePoliciesResult > asyncHandler ) { return describePoliciesAsync ( new DescribePoliciesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the DescribePolicies operation with an AsyncHandler . |
13,506 | public java . util . concurrent . Future < DescribeScalingProcessTypesResult > describeScalingProcessTypesAsync ( com . amazonaws . handlers . AsyncHandler < DescribeScalingProcessTypesRequest , DescribeScalingProcessTypesResult > asyncHandler ) { return describeScalingProcessTypesAsync ( new DescribeScalingProcessTypesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the DescribeScalingProcessTypes operation with an AsyncHandler . |
13,507 | public Waiter < DescribeClusterRequest > clusterRunning ( ) { return new WaiterBuilder < DescribeClusterRequest , DescribeClusterResult > ( ) . withSdkFunction ( new DescribeClusterFunction ( client ) ) . withAcceptors ( new ClusterRunning . IsRUNNINGMatcher ( ) , new ClusterRunning . IsWAITINGMatcher ( ) , new ClusterRunning . IsTERMINATINGMatcher ( ) , new ClusterRunning . IsTERMINATEDMatcher ( ) , new ClusterRunning . IsTERMINATED_WITH_ERRORSMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 60 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a ClusterRunning waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,508 | public Waiter < DescribeStepRequest > stepComplete ( ) { return new WaiterBuilder < DescribeStepRequest , DescribeStepResult > ( ) . withSdkFunction ( new DescribeStepFunction ( client ) ) . withAcceptors ( new StepComplete . IsCOMPLETEDMatcher ( ) , new StepComplete . IsFAILEDMatcher ( ) , new StepComplete . IsCANCELLEDMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 60 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a StepComplete waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,509 | public Waiter < DescribeClusterRequest > clusterTerminated ( ) { return new WaiterBuilder < DescribeClusterRequest , DescribeClusterResult > ( ) . withSdkFunction ( new DescribeClusterFunction ( client ) ) . withAcceptors ( new ClusterTerminated . IsTERMINATEDMatcher ( ) , new ClusterTerminated . IsTERMINATED_WITH_ERRORSMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 60 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a ClusterTerminated waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,510 | public Waiter < DescribeStacksRequest > stackExists ( ) { return new WaiterBuilder < DescribeStacksRequest , DescribeStacksResult > ( ) . withSdkFunction ( new DescribeStacksFunction ( client ) ) . withAcceptors ( new HttpSuccessStatusAcceptor ( WaiterState . SUCCESS ) , new StackExists . IsValidationErrorMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 20 ) , new FixedDelayStrategy ( 5 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a StackExists waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,511 | public Waiter < DescribeStacksRequest > stackCreateComplete ( ) { return new WaiterBuilder < DescribeStacksRequest , DescribeStacksResult > ( ) . withSdkFunction ( new DescribeStacksFunction ( client ) ) . withAcceptors ( new StackCreateComplete . IsCREATE_COMPLETEMatcher ( ) , new StackCreateComplete . IsCREATE_FAILEDMatcher ( ) , new StackCreateComplete . IsDELETE_COMPLETEMatcher ( ) , new StackCreateComplete . IsDELETE_FAILEDMatcher ( ) , new StackCreateComplete . IsROLLBACK_FAILEDMatcher ( ) , new StackCreateComplete . IsROLLBACK_COMPLETEMatcher ( ) , new StackCreateComplete . IsValidationErrorMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 120 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a StackCreateComplete waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,512 | public Waiter < DescribeChangeSetRequest > changeSetCreateComplete ( ) { return new WaiterBuilder < DescribeChangeSetRequest , DescribeChangeSetResult > ( ) . withSdkFunction ( new DescribeChangeSetFunction ( client ) ) . withAcceptors ( new ChangeSetCreateComplete . IsCREATE_COMPLETEMatcher ( ) , new ChangeSetCreateComplete . IsFAILEDMatcher ( ) , new ChangeSetCreateComplete . IsValidationErrorMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 120 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a ChangeSetCreateComplete waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,513 | public Waiter < DescribeStacksRequest > stackDeleteComplete ( ) { return new WaiterBuilder < DescribeStacksRequest , DescribeStacksResult > ( ) . withSdkFunction ( new DescribeStacksFunction ( client ) ) . withAcceptors ( new StackDeleteComplete . IsDELETE_COMPLETEMatcher ( ) , new StackDeleteComplete . IsValidationErrorMatcher ( ) , new StackDeleteComplete . IsDELETE_FAILEDMatcher ( ) , new StackDeleteComplete . IsCREATE_FAILEDMatcher ( ) , new StackDeleteComplete . IsROLLBACK_FAILEDMatcher ( ) , new StackDeleteComplete . IsUPDATE_ROLLBACK_FAILEDMatcher ( ) , new StackDeleteComplete . IsUPDATE_ROLLBACK_IN_PROGRESSMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 120 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a StackDeleteComplete waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,514 | public Waiter < DescribeStacksRequest > stackUpdateComplete ( ) { return new WaiterBuilder < DescribeStacksRequest , DescribeStacksResult > ( ) . withSdkFunction ( new DescribeStacksFunction ( client ) ) . withAcceptors ( new StackUpdateComplete . IsUPDATE_COMPLETEMatcher ( ) , new StackUpdateComplete . IsUPDATE_FAILEDMatcher ( ) , new StackUpdateComplete . IsUPDATE_ROLLBACK_FAILEDMatcher ( ) , new StackUpdateComplete . IsUPDATE_ROLLBACK_COMPLETEMatcher ( ) , new StackUpdateComplete . IsValidationErrorMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 120 ) , new FixedDelayStrategy ( 30 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a StackUpdateComplete waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,515 | public < T extends BaseResult > HttpResponseHandler < T > createResponseHandler ( JsonOperationMetadata operationMetadata , Unmarshaller < T , JsonUnmarshallerContext > responseUnmarshaller ) { final JsonResponseHandler < T > responseHandler = JSON_FACTORY . createResponseHandler ( operationMetadata , responseUnmarshaller ) ; return new ApiGatewayResponseHandler < > ( responseHandler ) ; } | Creates a response handler to be used for handling a successful response . |
13,516 | public Connector withParameters ( java . util . Map < String , String > parameters ) { setParameters ( parameters ) ; return this ; } | The parameters or configuration that the connector uses . |
13,517 | public long getInstanceLength ( ) { String contentRange = ( String ) metadata . get ( Headers . CONTENT_RANGE ) ; if ( contentRange != null ) { int pos = contentRange . lastIndexOf ( "/" ) ; if ( pos >= 0 ) return Long . parseLong ( contentRange . substring ( pos + 1 ) ) ; } return getContentLength ( ) ; } | Returns the physical length of the entire object stored in S3 . This is useful during for example a range get operation . |
13,518 | public Date getObjectLockRetainUntilDate ( ) { String dateStr = ( String ) metadata . get ( Headers . OBJECT_LOCK_RETAIN_UNTIL_DATE ) ; if ( dateStr != null ) { return DateUtils . parseISO8601Date ( dateStr ) ; } return null ; } | The date and time this object s Object Lock will expire . |
13,519 | public EventDimensions withAttributes ( java . util . Map < String , AttributeDimension > attributes ) { setAttributes ( attributes ) ; return this ; } | Custom attributes that your app reports to Amazon Pinpoint . You can use these attributes as selection criteria when you create an event filter . |
13,520 | public EventDimensions withMetrics ( java . util . Map < String , MetricDimension > metrics ) { setMetrics ( metrics ) ; return this ; } | Custom metrics that your app reports to Amazon Pinpoint . You can use these attributes as selection criteria when you create an event filter . |
13,521 | public static S3Link fromJson ( S3ClientCache s3cc , String json ) { ID id = Jackson . fromJsonString ( json , ID . class ) ; return new S3Link ( s3cc , id ) ; } | Deserializes from a JSON string . |
13,522 | public void setFlows ( java . util . Collection < ListedFlow > flows ) { if ( flows == null ) { this . flows = null ; return ; } this . flows = new java . util . ArrayList < ListedFlow > ( flows ) ; } | A list of flow summaries . |
13,523 | private static void createDeliveryStream ( ) throws Exception { boolean deliveryStreamExists = false ; LOG . info ( "Checking if " + deliveryStreamName + " already exits" ) ; List < String > deliveryStreamNames = listDeliveryStreams ( ) ; if ( deliveryStreamNames != null && deliveryStreamNames . contains ( deliveryStreamName ) ) { deliveryStreamExists = true ; LOG . info ( "DeliveryStream " + deliveryStreamName + " already exists. Not creating the new delivery stream" ) ; } else { LOG . info ( "DeliveryStream " + deliveryStreamName + " does not exist" ) ; } if ( ! deliveryStreamExists ) { CreateDeliveryStreamRequest createDeliveryStreamRequest = new CreateDeliveryStreamRequest ( ) ; createDeliveryStreamRequest . setDeliveryStreamName ( deliveryStreamName ) ; S3DestinationConfiguration redshiftS3Configuration = new S3DestinationConfiguration ( ) ; redshiftS3Configuration . setBucketARN ( s3BucketARN ) ; redshiftS3Configuration . setPrefix ( s3ObjectPrefix ) ; BufferingHints bufferingHints = null ; if ( s3DestinationSizeInMBs != null || s3DestinationIntervalInSeconds != null ) { bufferingHints = new BufferingHints ( ) ; bufferingHints . setSizeInMBs ( s3DestinationSizeInMBs ) ; bufferingHints . setIntervalInSeconds ( s3DestinationIntervalInSeconds ) ; } redshiftS3Configuration . setBufferingHints ( bufferingHints ) ; String iamRoleArn = createIamRole ( s3ObjectPrefix ) ; redshiftS3Configuration . setRoleARN ( iamRoleArn ) ; CopyCommand copyCommand = new CopyCommand ( ) ; copyCommand . withCopyOptions ( copyOptions ) . withDataTableName ( dataTableName ) ; RedshiftDestinationConfiguration redshiftDestinationConfiguration = new RedshiftDestinationConfiguration ( ) ; redshiftDestinationConfiguration . withClusterJDBCURL ( clusterJDBCUrl ) . withRoleARN ( iamRoleArn ) . withUsername ( username ) . withPassword ( password ) . withCopyCommand ( copyCommand ) . withS3Configuration ( redshiftS3Configuration ) ; createDeliveryStreamRequest . setRedshiftDestinationConfiguration ( redshiftDestinationConfiguration ) ; firehoseClient . createDeliveryStream ( createDeliveryStreamRequest ) ; LOG . info ( "Creating DeliveryStream : " + deliveryStreamName ) ; waitForDeliveryStreamToBecomeAvailable ( deliveryStreamName ) ; } } | Method to create delivery stream with Redshift destination configuration . |
13,524 | private static void updateDeliveryStream ( ) { DeliveryStreamDescription deliveryStreamDescription = describeDeliveryStream ( deliveryStreamName ) ; LOG . info ( "Updating DeliveryStream Destination: " + deliveryStreamName + " with new configuration options" ) ; UpdateDestinationRequest updateDestinationRequest = new UpdateDestinationRequest ( ) . withDeliveryStreamName ( deliveryStreamName ) . withCurrentDeliveryStreamVersionId ( deliveryStreamDescription . getVersionId ( ) ) . withDestinationId ( deliveryStreamDescription . getDestinations ( ) . get ( 0 ) . getDestinationId ( ) ) ; CopyCommand updatedCopyCommand = new CopyCommand ( ) . withDataTableName ( dataTableName ) . withCopyOptions ( updatedCopyOptions ) ; RedshiftDestinationUpdate redshiftDestinationUpdate = new RedshiftDestinationUpdate ( ) . withCopyCommand ( updatedCopyCommand ) ; updateDestinationRequest . setRedshiftDestinationUpdate ( redshiftDestinationUpdate ) ; firehoseClient . updateDestination ( updateDestinationRequest ) ; } | Method to update redshift destination with updated copy options . |
13,525 | public void setEntitlements ( java . util . Collection < ListedEntitlement > entitlements ) { if ( entitlements == null ) { this . entitlements = null ; return ; } this . entitlements = new java . util . ArrayList < ListedEntitlement > ( entitlements ) ; } | A list of entitlements that have been granted to you from other AWS accounts . |
13,526 | public java . util . concurrent . Future < DescribeConnectionsResult > describeConnectionsAsync ( com . amazonaws . handlers . AsyncHandler < DescribeConnectionsRequest , DescribeConnectionsResult > asyncHandler ) { return describeConnectionsAsync ( new DescribeConnectionsRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the DescribeConnections operation with an AsyncHandler . |
13,527 | private boolean shouldGenerateSdkRequestConfigSetter ( ShapeModel shape ) { return model . getMetadata ( ) . getProtocol ( ) == Protocol . API_GATEWAY && shape . getShapeType ( ) == ShapeType . Request ; } | For API Gateway request classes we override the sdkRequestConfig fluent setter to return the correct concrete request type for better method chaining . |
13,528 | public < MarshallT > JsonProtocolMarshallerBuilder < T > marshallerOverride ( MarshallLocation marshallLocation , MarshallingType < MarshallT > marshallingType , StructuredJsonMarshaller < MarshallT > marshaller ) { if ( marshallerRegistry == null ) { this . marshallerRegistry = MarshallerRegistry . builder ( ) ; } marshallerRegistry . addMarshaller ( marshallLocation , marshallingType , SimpleTypeJsonMarshallers . adapt ( marshaller ) ) ; return this ; } | Registers an override for the marshaller registry . |
13,529 | public String getJavaDataType ( Map < String , Shape > shapes , String shapeName ) { return getJavaDataType ( shapes , shapeName , null ) ; } | Returns the default Java type of the specified shape . |
13,530 | void verifySignature ( JsonNode messageJson ) { if ( ! signatureChecker . verifySignature ( toMap ( messageJson ) , fetchPublicKey ( messageJson ) ) ) { throw new SdkClientException ( "Signature in SNS message was invalid" ) ; } } | Verifies the signature of the SNS message by downloading the public certificate from SNS and computing the signature from the request properties . If the signature does not match or if the cert is inaccessible or invalid and exception will be thrown . |
13,531 | private synchronized PublicKey fetchPublicKey ( JsonNode messageJson ) { URI certUrl = URI . create ( messageJson . get ( SIGNING_CERT_URL ) . asText ( ) ) ; PublicKey publicKey = certificateCache . get ( certUrl . toString ( ) ) ; if ( publicKey == null ) { publicKey = createPublicKey ( downloadCertWithRetries ( certUrl ) ) ; certificateCache . add ( certUrl . toString ( ) , publicKey ) ; } return publicKey ; } | Retrieve the certificate public key from the cache if available otherwise download it from the URL in the message JSON . |
13,532 | private String downloadCertWithRetries ( URI certUrl ) { try { return downloadCert ( certUrl ) ; } catch ( SdkBaseException e ) { if ( isRetryable ( e ) ) { return downloadCert ( certUrl ) ; } else { throw e ; } } } | Downloads the certificate from the provided URL retrying once if applicable . |
13,533 | private boolean isRetryable ( SdkBaseException e ) { if ( e . getCause ( ) instanceof IOException ) { return true ; } else if ( e instanceof HttpException ) { return ( ( HttpException ) e ) . getStatusCode ( ) / 100 == 5 ; } else { return false ; } } | Determines if the exception received when downloading the certificate is retryable or not . |
13,534 | private String downloadCert ( URI certUrl ) { try { signingCertUrlVerifier . verifyCertUrl ( certUrl ) ; HttpResponse response = client . execute ( new HttpGet ( certUrl ) ) ; if ( ApacheUtils . isRequestSuccessful ( response ) ) { try { return IOUtils . toString ( response . getEntity ( ) . getContent ( ) ) ; } finally { response . getEntity ( ) . getContent ( ) . close ( ) ; } } else { throw new HttpException ( "Could not download the certificate from SNS" , response ) ; } } catch ( IOException e ) { throw new SdkClientException ( "Unable to download SNS certificate from " + certUrl . toString ( ) , e ) ; } } | Downloads the certificate from the provided URL . Asserts that the endpoint is an SNS endpoint and that the certificate is vended over HTTPs . |
13,535 | private PublicKey createPublicKey ( String cert ) { try { CertificateFactory fact = CertificateFactory . getInstance ( "X.509" ) ; InputStream stream = new ByteArrayInputStream ( cert . getBytes ( Charset . forName ( "UTF-8" ) ) ) ; X509Certificate cer = ( X509Certificate ) fact . generateCertificate ( stream ) ; validateCertificate ( cer ) ; return cer . getPublicKey ( ) ; } catch ( SdkBaseException e ) { throw e ; } catch ( Exception e ) { throw new SdkClientException ( "Could not create public key from certificate" , e ) ; } } | Build a PublicKey object from a cert |
13,536 | private void summarize ( MetricDatum datum , Map < String , MetricDatum > uniqueMetrics ) { Double value = datum . getValue ( ) ; if ( value == null ) { return ; } List < Dimension > dims = datum . getDimensions ( ) ; Collections . sort ( dims , DimensionComparator . INSTANCE ) ; String metricName = datum . getMetricName ( ) ; String key = metricName + Jackson . toJsonString ( dims ) ; MetricDatum statDatum = uniqueMetrics . get ( key ) ; if ( statDatum == null ) { statDatum = new MetricDatum ( ) . withDimensions ( datum . getDimensions ( ) ) . withMetricName ( metricName ) . withUnit ( datum . getUnit ( ) ) . withStatisticValues ( new StatisticSet ( ) . withMaximum ( value ) . withMinimum ( value ) . withSampleCount ( 0.0 ) . withSum ( 0.0 ) ) ; uniqueMetrics . put ( key , statDatum ) ; } StatisticSet stat = statDatum . getStatisticValues ( ) ; stat . setSampleCount ( stat . getSampleCount ( ) + 1.0 ) ; stat . setSum ( stat . getSum ( ) + value ) ; if ( value > stat . getMaximum ( ) ) { stat . setMaximum ( value ) ; } else if ( value < stat . getMinimum ( ) ) { stat . setMinimum ( value ) ; } } | Summarizes the given datum into the statistics of the respective unique metric . |
13,537 | private Iterable < PutMetricDataRequest > toPutMetricDataRequests ( Map < String , MetricDatum > uniqueMetrics ) { for ( MetricDatum datum : machineMetricFactory . generateMetrics ( ) ) { summarize ( datum , uniqueMetrics ) ; } List < PutMetricDataRequest > list = new ArrayList < PutMetricDataRequest > ( ) ; List < MetricDatum > data = new ArrayList < MetricDatum > ( ) ; for ( MetricDatum m : uniqueMetrics . values ( ) ) { data . add ( m ) ; if ( data . size ( ) == CloudWatchMetricConfig . MAX_METRICS_DATUM_SIZE ) { list . addAll ( newPutMetricDataRequests ( data ) ) ; data . clear ( ) ; } } if ( data . size ( ) > 0 ) { list . addAll ( newPutMetricDataRequests ( data ) ) ; } return list ; } | Consolidates the input metrics into a list of PutMetricDataRequest each within the maximum size limit imposed by CloudWatch . |
13,538 | private Collection < MetricDatum > filterOSMetrics ( Collection < MetricDatum > data ) { Collection < MetricDatum > output = new ArrayList < MetricDatum > ( data . size ( ) ) ; for ( MetricDatum datum : data ) { if ( ! OS_METRIC_NAME . equals ( datum . getMetricName ( ) ) ) output . add ( datum ) ; } return output ; } | Return a collection of metrics almost the same as the input except with all OS metrics removed . |
13,539 | final MetricDatum cloneMetricDatum ( MetricDatum md ) { return new MetricDatum ( ) . withDimensions ( md . getDimensions ( ) ) . withMetricName ( md . getMetricName ( ) ) . withStatisticValues ( md . getStatisticValues ( ) ) . withTimestamp ( md . getTimestamp ( ) ) . withUnit ( md . getUnit ( ) ) . withValue ( md . getValue ( ) ) ; } | Returns a metric datum cloned from the given one . Made package private only for testing purposes . |
13,540 | public void setChannels ( java . util . Collection < Channel > channels ) { if ( channels == null ) { this . channels = null ; return ; } this . channels = new java . util . ArrayList < Channel > ( channels ) ; } | A list of Channel records . |
13,541 | public ArchiveFindingsResult archiveFindings ( ArchiveFindingsRequest request ) { request = beforeClientExecution ( request ) ; return executeArchiveFindings ( request ) ; } | Archives Amazon GuardDuty findings specified by the list of finding IDs . |
13,542 | public CreateDetectorResult createDetector ( CreateDetectorRequest request ) { request = beforeClientExecution ( request ) ; return executeCreateDetector ( request ) ; } | Creates a single Amazon GuardDuty detector . A detector is an object that represents the GuardDuty service . A detector must be created in order for GuardDuty to become operational . |
13,543 | public CreateFilterResult createFilter ( CreateFilterRequest request ) { request = beforeClientExecution ( request ) ; return executeCreateFilter ( request ) ; } | Creates a filter using the specified finding criteria . |
13,544 | public CreateIPSetResult createIPSet ( CreateIPSetRequest request ) { request = beforeClientExecution ( request ) ; return executeCreateIPSet ( request ) ; } | Creates a new IPSet - a list of trusted IP addresses that have been whitelisted for secure communication with AWS infrastructure and applications . |
13,545 | public CreateSampleFindingsResult createSampleFindings ( CreateSampleFindingsRequest request ) { request = beforeClientExecution ( request ) ; return executeCreateSampleFindings ( request ) ; } | Generates example findings of types specified by the list of finding types . If NULL is specified for findingTypes the API generates example findings of all supported finding types . |
13,546 | public CreateThreatIntelSetResult createThreatIntelSet ( CreateThreatIntelSetRequest request ) { request = beforeClientExecution ( request ) ; return executeCreateThreatIntelSet ( request ) ; } | Create a new ThreatIntelSet . ThreatIntelSets consist of known malicious IP addresses . GuardDuty generates findings based on ThreatIntelSets . |
13,547 | public DeleteDetectorResult deleteDetector ( DeleteDetectorRequest request ) { request = beforeClientExecution ( request ) ; return executeDeleteDetector ( request ) ; } | Deletes a Amazon GuardDuty detector specified by the detector ID . |
13,548 | public DeleteFilterResult deleteFilter ( DeleteFilterRequest request ) { request = beforeClientExecution ( request ) ; return executeDeleteFilter ( request ) ; } | Deletes the filter specified by the filter name . |
13,549 | public DeleteIPSetResult deleteIPSet ( DeleteIPSetRequest request ) { request = beforeClientExecution ( request ) ; return executeDeleteIPSet ( request ) ; } | Deletes the IPSet specified by the IPSet ID . |
13,550 | public DeleteThreatIntelSetResult deleteThreatIntelSet ( DeleteThreatIntelSetRequest request ) { request = beforeClientExecution ( request ) ; return executeDeleteThreatIntelSet ( request ) ; } | Deletes ThreatIntelSet specified by the ThreatIntelSet ID . |
13,551 | public GetDetectorResult getDetector ( GetDetectorRequest request ) { request = beforeClientExecution ( request ) ; return executeGetDetector ( request ) ; } | Retrieves an Amazon GuardDuty detector specified by the detectorId . |
13,552 | public GetFilterResult getFilter ( GetFilterRequest request ) { request = beforeClientExecution ( request ) ; return executeGetFilter ( request ) ; } | Returns the details of the filter specified by the filter name . |
13,553 | public GetFindingsStatisticsResult getFindingsStatistics ( GetFindingsStatisticsRequest request ) { request = beforeClientExecution ( request ) ; return executeGetFindingsStatistics ( request ) ; } | Lists Amazon GuardDuty findings statistics for the specified detector ID . |
13,554 | public GetIPSetResult getIPSet ( GetIPSetRequest request ) { request = beforeClientExecution ( request ) ; return executeGetIPSet ( request ) ; } | Retrieves the IPSet specified by the IPSet ID . |
13,555 | public GetThreatIntelSetResult getThreatIntelSet ( GetThreatIntelSetRequest request ) { request = beforeClientExecution ( request ) ; return executeGetThreatIntelSet ( request ) ; } | Retrieves the ThreatIntelSet that is specified by the ThreatIntelSet ID . |
13,556 | public ListDetectorsResult listDetectors ( ListDetectorsRequest request ) { request = beforeClientExecution ( request ) ; return executeListDetectors ( request ) ; } | Lists detectorIds of all the existing Amazon GuardDuty detector resources . |
13,557 | public ListFiltersResult listFilters ( ListFiltersRequest request ) { request = beforeClientExecution ( request ) ; return executeListFilters ( request ) ; } | Returns a paginated list of the current filters . |
13,558 | public ListFindingsResult listFindings ( ListFindingsRequest request ) { request = beforeClientExecution ( request ) ; return executeListFindings ( request ) ; } | Lists Amazon GuardDuty findings for the specified detector ID . |
13,559 | public ListIPSetsResult listIPSets ( ListIPSetsRequest request ) { request = beforeClientExecution ( request ) ; return executeListIPSets ( request ) ; } | Lists the IPSets of the GuardDuty service specified by the detector ID . |
13,560 | public ListThreatIntelSetsResult listThreatIntelSets ( ListThreatIntelSetsRequest request ) { request = beforeClientExecution ( request ) ; return executeListThreatIntelSets ( request ) ; } | Lists the ThreatIntelSets of the GuardDuty service specified by the detector ID . |
13,561 | public StartMonitoringMembersResult startMonitoringMembers ( StartMonitoringMembersRequest request ) { request = beforeClientExecution ( request ) ; return executeStartMonitoringMembers ( request ) ; } | Re - enables GuardDuty to monitor findings of the member accounts specified by the account IDs . A master GuardDuty account can run this command after disabling GuardDuty from monitoring these members findings by running StopMonitoringMembers . |
13,562 | public UnarchiveFindingsResult unarchiveFindings ( UnarchiveFindingsRequest request ) { request = beforeClientExecution ( request ) ; return executeUnarchiveFindings ( request ) ; } | Unarchives Amazon GuardDuty findings specified by the list of finding IDs . |
13,563 | public UpdateDetectorResult updateDetector ( UpdateDetectorRequest request ) { request = beforeClientExecution ( request ) ; return executeUpdateDetector ( request ) ; } | Updates an Amazon GuardDuty detector specified by the detectorId . |
13,564 | public UpdateFilterResult updateFilter ( UpdateFilterRequest request ) { request = beforeClientExecution ( request ) ; return executeUpdateFilter ( request ) ; } | Updates the filter specified by the filter name . |
13,565 | public UpdateFindingsFeedbackResult updateFindingsFeedback ( UpdateFindingsFeedbackRequest request ) { request = beforeClientExecution ( request ) ; return executeUpdateFindingsFeedback ( request ) ; } | Marks specified Amazon GuardDuty findings as useful or not useful . |
13,566 | public UpdateIPSetResult updateIPSet ( UpdateIPSetRequest request ) { request = beforeClientExecution ( request ) ; return executeUpdateIPSet ( request ) ; } | Updates the IPSet specified by the IPSet ID . |
13,567 | public UpdateThreatIntelSetResult updateThreatIntelSet ( UpdateThreatIntelSetRequest request ) { request = beforeClientExecution ( request ) ; return executeUpdateThreatIntelSet ( request ) ; } | Updates the ThreatIntelSet specified by ThreatIntelSet ID . |
13,568 | public void setItem ( java . util . Collection < ActivityResponse > item ) { if ( item == null ) { this . item = null ; return ; } this . item = new java . util . ArrayList < ActivityResponse > ( item ) ; } | List of campaign activities |
13,569 | public Waiter < DescribeStreamRequest > streamExists ( ) { return new WaiterBuilder < DescribeStreamRequest , DescribeStreamResult > ( ) . withSdkFunction ( new DescribeStreamFunction ( client ) ) . withAcceptors ( new StreamExists . IsACTIVEMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 18 ) , new FixedDelayStrategy ( 10 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a StreamExists waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,570 | public Waiter < DescribeStreamRequest > streamNotExists ( ) { return new WaiterBuilder < DescribeStreamRequest , DescribeStreamResult > ( ) . withSdkFunction ( new DescribeStreamFunction ( client ) ) . withAcceptors ( new StreamNotExists . IsResourceNotFoundExceptionMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 18 ) , new FixedDelayStrategy ( 10 ) ) ) . withExecutorService ( executorService ) . build ( ) ; } | Builds a StreamNotExists waiter by using custom parameters waiterParameters and other parameters defined in the waiters specification and then polls until it determines whether the resource entered the desired state or not where polling criteria is bound by either default polling strategy or custom polling strategy . |
13,571 | private String generateScope ( SignableRequest < ? > request , String dateStamp , String serviceName , String regionName ) { final StringBuilder scopeBuilder = new StringBuilder ( ) ; return scopeBuilder . append ( dateStamp ) . append ( "/" ) . append ( regionName ) . append ( "/" ) . append ( serviceName ) . append ( "/" ) . append ( SignerConstants . AWS4_TERMINATOR ) . toString ( ) ; } | Returns the scope to be used for the signing . |
13,572 | public BootstrapActionConfig newRunIf ( String condition , BootstrapActionConfig config ) { List < String > args = config . getScriptBootstrapAction ( ) . getArgs ( ) ; args . add ( 0 , condition ) ; args . add ( 1 , config . getScriptBootstrapAction ( ) . getPath ( ) ) ; return new BootstrapActionConfig ( ) . withName ( "Run If, " + config . getName ( ) ) . withScriptBootstrapAction ( new ScriptBootstrapActionConfig ( ) . withPath ( "s3://" + bucket + "/bootstrap-actions/run-if" ) . withArgs ( args ) ) ; } | Create a new run - if bootstrap action which lets you conditionally run bootstrap actions . |
13,573 | public void setErrors ( java . util . Collection < String > errors ) { if ( errors == null ) { this . errors = null ; return ; } this . errors = new java . util . ArrayList < String > ( errors ) ; } | A list of errors that might have been generated from processes on this flow . |
13,574 | public AccessControlTranslation withOwner ( OwnerOverride owner ) { setOwner ( owner == null ? null : owner . toString ( ) ) ; return this ; } | Sets the override value for the owner of the replica object . |
13,575 | public static boolean registerConnectionManager ( HttpClientConnectionManager connectionManager , long maxIdleInMs ) { if ( instance == null ) { synchronized ( IdleConnectionReaper . class ) { if ( instance == null ) { instance = new IdleConnectionReaper ( ) ; instance . start ( ) ; } } } return connectionManagers . put ( connectionManager , maxIdleInMs ) == null ; } | Registers the given connection manager with this reaper ; |
13,576 | public static boolean removeConnectionManager ( HttpClientConnectionManager connectionManager ) { boolean wasRemoved = connectionManagers . remove ( connectionManager ) != null ; if ( connectionManagers . isEmpty ( ) ) { shutdown ( ) ; } return wasRemoved ; } | Removes the given connection manager from this reaper and shutting down the reaper if there is zero connection manager left . |
13,577 | public java . util . concurrent . Future < CreateAccessKeyResult > createAccessKeyAsync ( com . amazonaws . handlers . AsyncHandler < CreateAccessKeyRequest , CreateAccessKeyResult > asyncHandler ) { return createAccessKeyAsync ( new CreateAccessKeyRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the CreateAccessKey operation with an AsyncHandler . |
13,578 | public java . util . concurrent . Future < GetAccountAuthorizationDetailsResult > getAccountAuthorizationDetailsAsync ( com . amazonaws . handlers . AsyncHandler < GetAccountAuthorizationDetailsRequest , GetAccountAuthorizationDetailsResult > asyncHandler ) { return getAccountAuthorizationDetailsAsync ( new GetAccountAuthorizationDetailsRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the GetAccountAuthorizationDetails operation with an AsyncHandler . |
13,579 | public java . util . concurrent . Future < GetAccountSummaryResult > getAccountSummaryAsync ( com . amazonaws . handlers . AsyncHandler < GetAccountSummaryRequest , GetAccountSummaryResult > asyncHandler ) { return getAccountSummaryAsync ( new GetAccountSummaryRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the GetAccountSummary operation with an AsyncHandler . |
13,580 | public java . util . concurrent . Future < GetUserResult > getUserAsync ( com . amazonaws . handlers . AsyncHandler < GetUserRequest , GetUserResult > asyncHandler ) { return getUserAsync ( new GetUserRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the GetUser operation with an AsyncHandler . |
13,581 | public java . util . concurrent . Future < ListAccessKeysResult > listAccessKeysAsync ( com . amazonaws . handlers . AsyncHandler < ListAccessKeysRequest , ListAccessKeysResult > asyncHandler ) { return listAccessKeysAsync ( new ListAccessKeysRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListAccessKeys operation with an AsyncHandler . |
13,582 | public java . util . concurrent . Future < ListAccountAliasesResult > listAccountAliasesAsync ( com . amazonaws . handlers . AsyncHandler < ListAccountAliasesRequest , ListAccountAliasesResult > asyncHandler ) { return listAccountAliasesAsync ( new ListAccountAliasesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListAccountAliases operation with an AsyncHandler . |
13,583 | public java . util . concurrent . Future < ListOpenIDConnectProvidersResult > listOpenIDConnectProvidersAsync ( com . amazonaws . handlers . AsyncHandler < ListOpenIDConnectProvidersRequest , ListOpenIDConnectProvidersResult > asyncHandler ) { return listOpenIDConnectProvidersAsync ( new ListOpenIDConnectProvidersRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListOpenIDConnectProviders operation with an AsyncHandler . |
13,584 | public java . util . concurrent . Future < ListPoliciesResult > listPoliciesAsync ( com . amazonaws . handlers . AsyncHandler < ListPoliciesRequest , ListPoliciesResult > asyncHandler ) { return listPoliciesAsync ( new ListPoliciesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListPolicies operation with an AsyncHandler . |
13,585 | public java . util . concurrent . Future < ListRolesResult > listRolesAsync ( com . amazonaws . handlers . AsyncHandler < ListRolesRequest , ListRolesResult > asyncHandler ) { return listRolesAsync ( new ListRolesRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListRoles operation with an AsyncHandler . |
13,586 | public java . util . concurrent . Future < ListSAMLProvidersResult > listSAMLProvidersAsync ( com . amazonaws . handlers . AsyncHandler < ListSAMLProvidersRequest , ListSAMLProvidersResult > asyncHandler ) { return listSAMLProvidersAsync ( new ListSAMLProvidersRequest ( ) , asyncHandler ) ; } | Simplified method form for invoking the ListSAMLProviders operation with an AsyncHandler . |
13,587 | protected final void bindIndexed ( ConfigurationPropertyName name , Bindable < ? > target , AggregateElementBinder elementBinder , ResolvableType aggregateType , ResolvableType elementType , IndexedCollectionSupplier result ) { for ( ConfigurationPropertySource source : getContext ( ) . getSources ( ) ) { bindIndexed ( source , name , target , elementBinder , result , aggregateType , elementType ) ; if ( result . wasSupplied ( ) && result . get ( ) != null ) { return ; } } } | Bind indexed elements to the supplied collection . |
13,588 | public void setServletNames ( Collection < String > servletNames ) { Assert . notNull ( servletNames , "ServletNames must not be null" ) ; this . servletNames = new LinkedHashSet < > ( servletNames ) ; } | Set servlet names that the filter will be registered against . This will replace any previously specified servlet names . |
13,589 | public void addServletNames ( String ... servletNames ) { Assert . notNull ( servletNames , "ServletNames must not be null" ) ; this . servletNames . addAll ( Arrays . asList ( servletNames ) ) ; } | Add servlet names for the filter . |
13,590 | public void setUrlPatterns ( Collection < String > urlPatterns ) { Assert . notNull ( urlPatterns , "UrlPatterns must not be null" ) ; this . urlPatterns = new LinkedHashSet < > ( urlPatterns ) ; } | Set the URL patterns that the filter will be registered against . This will replace any previously specified URL patterns . |
13,591 | public void addUrlPatterns ( String ... urlPatterns ) { Assert . notNull ( urlPatterns , "UrlPatterns must not be null" ) ; Collections . addAll ( this . urlPatterns , urlPatterns ) ; } | Add URL patterns as defined in the Servlet specification that the filter will be registered against . |
13,592 | public File getDir ( String subDir ) { File dir = new File ( getDir ( ) , subDir ) ; dir . mkdirs ( ) ; return dir ; } | Return a sub - directory of the application temp . |
13,593 | public File getDir ( ) { if ( this . dir == null ) { synchronized ( this ) { byte [ ] hash = generateHash ( this . sourceClass ) ; this . dir = new File ( getTempDirectory ( ) , toHexString ( hash ) ) ; this . dir . mkdirs ( ) ; Assert . state ( this . dir . exists ( ) , ( ) -> "Unable to create temp directory " + this . dir ) ; } } return this . dir ; } | Return the directory to be used for application specific temp files . |
13,594 | protected Map < String , Object > generateContent ( ) { Map < String , Object > content = extractContent ( toPropertySource ( ) ) ; postProcessContent ( content ) ; return content ; } | Extract the content to contribute to the info endpoint . |
13,595 | @ SuppressWarnings ( "unchecked" ) protected Map < String , Object > getNestedMap ( Map < String , Object > map , String key ) { Object value = map . get ( key ) ; if ( value == null ) { return Collections . emptyMap ( ) ; } return ( Map < String , Object > ) value ; } | Return the nested map with the specified key or empty map if the specified map contains no mapping for the key . |
13,596 | public static < C , A > Callback < C , A > callback ( Class < C > callbackType , C callbackInstance , A argument , Object ... additionalArguments ) { Assert . notNull ( callbackType , "CallbackType must not be null" ) ; Assert . notNull ( callbackInstance , "CallbackInstance must not be null" ) ; return new Callback < > ( callbackType , callbackInstance , argument , additionalArguments ) ; } | Start a call to a single callback instance dealing with common generic type concerns and exceptions . |
13,597 | public static < C , A > Callbacks < C , A > callbacks ( Class < C > callbackType , Collection < ? extends C > callbackInstances , A argument , Object ... additionalArguments ) { Assert . notNull ( callbackType , "CallbackType must not be null" ) ; Assert . notNull ( callbackInstances , "CallbackInstances must not be null" ) ; return new Callbacks < > ( callbackType , callbackInstances , argument , additionalArguments ) ; } | Start a call to callback instances dealing with common generic type concerns and exceptions . |
13,598 | public < R > Stream < R > invokeAnd ( Function < C , R > invoker ) { Function < C , InvocationResult < R > > mapper = ( callbackInstance ) -> invoke ( callbackInstance , ( ) -> invoker . apply ( callbackInstance ) ) ; return this . callbackInstances . stream ( ) . map ( mapper ) . filter ( InvocationResult :: hasResult ) . map ( InvocationResult :: get ) ; } | Invoke the callback instances where the callback method returns a result . |
13,599 | public int start ( ) throws IOException { synchronized ( this . monitor ) { Assert . state ( ! isStarted ( ) , "Server already started" ) ; logger . debug ( "Starting live reload server on port " + this . port ) ; this . serverSocket = new ServerSocket ( this . port ) ; int localPort = this . serverSocket . getLocalPort ( ) ; this . listenThread = this . threadFactory . newThread ( this :: acceptConnections ) ; this . listenThread . setDaemon ( true ) ; this . listenThread . setName ( "Live Reload Server" ) ; this . listenThread . start ( ) ; return localPort ; } } | Start the livereload server and accept incoming connections . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.