NetworkFlowMonitor ****************** Client ====== class NetworkFlowMonitor.Client A low-level client representing Network Flow Monitor Network Flow Monitor is a feature of Amazon CloudWatch Network Monitoring that provides visibility into the performance of network flows for your Amazon Web Services workloads, between instances in subnets, as well as to and from Amazon Web Services. Lightweight agents that you install on the instances capture performance metrics for your network flows, such as packet loss and latency, and send them to the Network Flow Monitor backend. Then, you can view and analyze metrics from the top contributors for each metric type, to help troubleshoot issues. In addition, when you create a monitor, Network Flow Monitor provides a network health indicator (NHI) that informs you whether there were Amazon Web Services network issues for one or more of the network flows tracked by a monitor, during a time period that you choose. By using this value, you can independently determine if the Amazon Web Services network is impacting your workload during a specific time frame, to help you focus troubleshooting efforts. To learn more about Network Flow Monitor, see the Network Flow Monitor User Guide in the Amazon CloudWatch User Guide. import boto3 client = boto3.client('networkflowmonitor') These are the available methods: * can_paginate * close * create_monitor * create_scope * delete_monitor * delete_scope * get_monitor * get_paginator * get_query_results_monitor_top_contributors * get_query_results_workload_insights_top_contributors * get_query_results_workload_insights_top_contributors_data * get_query_status_monitor_top_contributors * get_query_status_workload_insights_top_contributors * get_query_status_workload_insights_top_contributors_data * get_scope * get_waiter * list_monitors * list_scopes * list_tags_for_resource * start_query_monitor_top_contributors * start_query_workload_insights_top_contributors * start_query_workload_insights_top_contributors_data * stop_query_monitor_top_contributors * stop_query_workload_insights_top_contributors * stop_query_workload_insights_top_contributors_data * tag_resource * untag_resource * update_monitor * update_scope Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * GetQueryResultsMonitorTopContributors * GetQueryResultsWorkloadInsightsTopContributors * GetQueryResultsWorkloadInsightsTopContributorsData * ListMonitors * ListScopes NetworkFlowMonitor / Paginator / ListMonitors ListMonitors ************ class NetworkFlowMonitor.Paginator.ListMonitors paginator = client.get_paginator('list_monitors') paginate(**kwargs) Creates an iterator that will paginate through responses from "NetworkFlowMonitor.Client.list_monitors()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( monitorStatus='PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **monitorStatus** (*string*) -- The status of a monitor. The status can be one of the following * "PENDING": The monitor is in the process of being created. * "ACTIVE": The monitor is active. * "INACTIVE": The monitor is inactive. * "ERROR": Monitor creation failed due to an error. * "DELETING": The monitor is in the process of being deleted. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'monitors': [ { 'monitorArn': 'string', 'monitorName': 'string', 'monitorStatus': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **monitors** *(list) --* The monitors that are in an account. * *(dict) --* A summary of information about a monitor, includ the ARN, the name, and the status. * **monitorArn** *(string) --* The Amazon Resource Name (ARN) of the monitor. * **monitorName** *(string) --* The name of the monitor. * **monitorStatus** *(string) --* The status of a monitor. The status can be one of the following * "PENDING": The monitor is in the process of being created. * "ACTIVE": The monitor is active. * "INACTIVE": The monitor is inactive. * "ERROR": Monitor creation failed due to an error. * "DELETING": The monitor is in the process of being deleted. * **NextToken** *(string) --* A token to resume pagination. NetworkFlowMonitor / Paginator / GetQueryResultsMonitorTopContributors GetQueryResultsMonitorTopContributors ************************************* class NetworkFlowMonitor.Paginator.GetQueryResultsMonitorTopContributors paginator = client.get_paginator('get_query_results_monitor_top_contributors') paginate(**kwargs) Creates an iterator that will paginate through responses from " NetworkFlowMonitor.Client.get_query_results_monitor_top_contrib utors()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( monitorName='string', queryId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'unit': 'Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None', 'topContributors': [ { 'localIp': 'string', 'snatIp': 'string', 'localInstanceId': 'string', 'localVpcId': 'string', 'localRegion': 'string', 'localAz': 'string', 'localSubnetId': 'string', 'targetPort': 123, 'destinationCategory': 'INTRA_AZ'|'INTER_AZ'|'INTER_VPC'|'UNCLASSIFIED'|'AMAZON_S3'|'AMAZON_DYNAMODB', 'remoteVpcId': 'string', 'remoteRegion': 'string', 'remoteAz': 'string', 'remoteSubnetId': 'string', 'remoteInstanceId': 'string', 'remoteIp': 'string', 'dnatIp': 'string', 'value': 123, 'traversedConstructs': [ { 'componentId': 'string', 'componentType': 'string', 'componentArn': 'string', 'serviceName': 'string' }, ], 'kubernetesMetadata': { 'localServiceName': 'string', 'localPodName': 'string', 'localPodNamespace': 'string', 'remoteServiceName': 'string', 'remotePodName': 'string', 'remotePodNamespace': 'string' }, 'localInstanceArn': 'string', 'localSubnetArn': 'string', 'localVpcArn': 'string', 'remoteInstanceArn': 'string', 'remoteSubnetArn': 'string', 'remoteVpcArn': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **unit** *(string) --* The units for a metric returned by the query. * **topContributors** *(list) --* The top contributor network flows overall for a specific metric type, for example, the number of retransmissions. * *(dict) --* A set of information for a top contributor network flow in a monitor. In a monitor, Network Flow Monitor returns information about the network flows for top contributors for each metric. Top contributors are network flows with the top values for each metric type. * **localIp** *(string) --* The IP address of the local resource for a top contributor network flow. * **snatIp** *(string) --* The secure network address translation (SNAT) IP address for a top contributor network flow. * **localInstanceId** *(string) --* The instance identifier for the local resource for a top contributor network flow. * **localVpcId** *(string) --* The VPC ID for a top contributor network flow for the local resource. * **localRegion** *(string) --* The Amazon Web Services Region for the local resource for a top contributor network flow. * **localAz** *(string) --* The Availability Zone for the local resource for a top contributor network flow. * **localSubnetId** *(string) --* The subnet ID for the local resource for a top contributor network flow. * **targetPort** *(integer) --* The target port. * **destinationCategory** *(string) --* The destination category for a top contributors row. Destination categories can be one of the following: * "INTRA_AZ": Top contributor network flows within a single Availability Zone * "INTER_AZ": Top contributor network flows between Availability Zones * "INTER_VPC": Top contributor network flows between VPCs * "AWS_SERVICES": Top contributor network flows to or from Amazon Web Services services * "UNCLASSIFIED": Top contributor network flows that do not have a bucket classification * **remoteVpcId** *(string) --* The VPC ID for a top contributor network flow for the remote resource. * **remoteRegion** *(string) --* The Amazon Web Services Region for the remote resource for a top contributor network flow. * **remoteAz** *(string) --* The Availability Zone for the remote resource for a top contributor network flow. * **remoteSubnetId** *(string) --* The subnet ID for the remote resource for a top contributor network flow. * **remoteInstanceId** *(string) --* The instance identifier for the remote resource for a top contributor network flow. * **remoteIp** *(string) --* The IP address of the remote resource for a top contributor network flow. * **dnatIp** *(string) --* The destination network address translation (DNAT) IP address for a top contributor network flow. * **value** *(integer) --* The value of the metric for a top contributor network flow. * **traversedConstructs** *(list) --* The constructs traversed by a network flow. * *(dict) --* A section of the network that a network flow has traveled through. * **componentId** *(string) --* The identifier for the traversed component. * **componentType** *(string) --* The type of component that was traversed. * **componentArn** *(string) --* The Amazon Resource Name (ARN) of a tranversed component. * **serviceName** *(string) --* The service name for the traversed component. * **kubernetesMetadata** *(dict) --* Meta data about Kubernetes resources. * **localServiceName** *(string) --* The service name for a local resource. * **localPodName** *(string) --* The name of the pod for a local resource. * **localPodNamespace** *(string) --* The namespace of the pod for a local resource. * **remoteServiceName** *(string) --* The service name for a remote resource. * **remotePodName** *(string) --* The name of the pod for a remote resource. * **remotePodNamespace** *(string) --* The namespace of the pod for a remote resource. * **localInstanceArn** *(string) --* The Amazon Resource Name (ARN) of a local resource. * **localSubnetArn** *(string) --* The Amazon Resource Name (ARN) of a local subnet. * **localVpcArn** *(string) --* The Amazon Resource Name (ARN) of a local VPC. * **remoteInstanceArn** *(string) --* The Amazon Resource Name (ARN) of a remote resource. * **remoteSubnetArn** *(string) --* The Amazon Resource Name (ARN) of a remote subnet. * **remoteVpcArn** *(string) --* The Amazon Resource Name (ARN) of a remote VPC. * **NextToken** *(string) --* A token to resume pagination. NetworkFlowMonitor / Paginator / GetQueryResultsWorkloadInsightsTopContributorsData GetQueryResultsWorkloadInsightsTopContributorsData ************************************************** class NetworkFlowMonitor.Paginator.GetQueryResultsWorkloadInsightsTopContributorsData paginator = client.get_paginator('get_query_results_workload_insights_top_contributors_data') paginate(**kwargs) Creates an iterator that will paginate through responses from " NetworkFlowMonitor.Client.get_query_results_workload_insights_t op_contributors_data()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( scopeId='string', queryId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'unit': 'Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None', 'datapoints': [ { 'timestamps': [ datetime(2015, 1, 1), ], 'values': [ 123.0, ], 'label': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **unit** *(string) --* The units for a metric returned by the query. * **datapoints** *(list) --* The datapoints returned by the query. * *(dict) --* A data point for a top contributor network flow in a scope. Network Flow Monitor returns information about the network flows with the top values for each metric type, which are called top contributors. * **timestamps** *(list) --* An array of the timestamps for the data point. * *(datetime) --* * **values** *(list) --* The values for the data point. * *(float) --* * **label** *(string) --* The label identifying the data point. * **NextToken** *(string) --* A token to resume pagination. NetworkFlowMonitor / Paginator / ListScopes ListScopes ********** class NetworkFlowMonitor.Paginator.ListScopes paginator = client.get_paginator('list_scopes') paginate(**kwargs) Creates an iterator that will paginate through responses from "NetworkFlowMonitor.Client.list_scopes()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max- items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'scopes': [ { 'scopeId': 'string', 'status': 'SUCCEEDED'|'IN_PROGRESS'|'FAILED'|'DEACTIVATING'|'DEACTIVATED', 'scopeArn': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **scopes** *(list) --* The scopes returned by the call. * *(dict) --* A summary of information about a scope, including the ARN, target ID, and Amazon Web Services Region. * **scopeId** *(string) --* The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. * **status** *(string) --* The status for a scope. The status can be one of the following: "SUCCEEDED", "IN_PROGRESS", "FAILED", "DEACTIVATING", or "DEACTIVATED". A status of "DEACTIVATING" means that you've requested a scope to be deactivated and Network Flow Monitor is in the process of deactivating the scope. A status of "DEACTIVATED" means that the deactivating process is complete. * **scopeArn** *(string) --* The Amazon Resource Name (ARN) of the scope. * **NextToken** *(string) --* A token to resume pagination. NetworkFlowMonitor / Paginator / GetQueryResultsWorkloadInsightsTopContributors GetQueryResultsWorkloadInsightsTopContributors ********************************************** class NetworkFlowMonitor.Paginator.GetQueryResultsWorkloadInsightsTopContributors paginator = client.get_paginator('get_query_results_workload_insights_top_contributors') paginate(**kwargs) Creates an iterator that will paginate through responses from " NetworkFlowMonitor.Client.get_query_results_workload_insights_t op_contributors()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( scopeId='string', queryId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'topContributors': [ { 'accountId': 'string', 'localSubnetId': 'string', 'localAz': 'string', 'localVpcId': 'string', 'localRegion': 'string', 'remoteIdentifier': 'string', 'value': 123, 'localSubnetArn': 'string', 'localVpcArn': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **topContributors** *(list) --* The top contributor network flows overall for a specific metric type, for example, the number of retransmissions. * *(dict) --* A row for a top contributor for a scope. * **accountId** *(string) --* The account ID for a specific row of data. * **localSubnetId** *(string) --* The subnet identifier for the local resource. * **localAz** *(string) --* The identifier for the Availability Zone where the local resource is located. * **localVpcId** *(string) --* The identifier for the VPC for the local resource. * **localRegion** *(string) --* The Amazon Web Services Region where the local resource is located. * **remoteIdentifier** *(string) --* The identifier of a remote resource. * **value** *(integer) --* The value for a metric. * **localSubnetArn** *(string) --* The Amazon Resource Name (ARN) of a local subnet. * **localVpcArn** *(string) --* The Amazon Resource Name (ARN) of a local VPC. * **NextToken** *(string) --* A token to resume pagination. NetworkFlowMonitor / Client / get_paginator get_paginator ************* NetworkFlowMonitor.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. NetworkFlowMonitor / Client / get_query_results_workload_insights_top_contributors_data get_query_results_workload_insights_top_contributors_data ********************************************************* NetworkFlowMonitor.Client.get_query_results_workload_insights_top_contributors_data(**kwargs) Return the data for a query with the Network Flow Monitor query interface. Specify the query that you want to return results for by providing a query ID and a scope ID. This query returns the data for top contributors for workload insights for a specific scope. Workload insights provide a high level view of network flow performance data collected by agents for a scope. To return just the top contributors, see "GetQueryResultsWorkloadInsightsTopContributors". Create a query ID for this call by calling the corresponding API call to start the query, "StartQueryWorkloadInsightsTopContributorsData". Use the scope ID that was returned for your account by "CreateScope". Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. The top contributor network flows overall are for a specific metric type, for example, the number of retransmissions. See also: AWS API Documentation **Request Syntax** response = client.get_query_results_workload_insights_top_contributors_data( scopeId='string', queryId='string', nextToken='string', maxResults=123 ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. * **nextToken** (*string*) -- The token for the next set of results. You receive this token from a previous call. * **maxResults** (*integer*) -- The number of query results that you want to return with this call. Return type: dict Returns: **Response Syntax** { 'unit': 'Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None', 'datapoints': [ { 'timestamps': [ datetime(2015, 1, 1), ], 'values': [ 123.0, ], 'label': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **unit** *(string) --* The units for a metric returned by the query. * **datapoints** *(list) --* The datapoints returned by the query. * *(dict) --* A data point for a top contributor network flow in a scope. Network Flow Monitor returns information about the network flows with the top values for each metric type, which are called top contributors. * **timestamps** *(list) --* An array of the timestamps for the data point. * *(datetime) --* * **values** *(list) --* The values for the data point. * *(float) --* * **label** *(string) --* The label identifying the data point. * **nextToken** *(string) --* The token for the next set of results. You receive this token from a previous call. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / can_paginate can_paginate ************ NetworkFlowMonitor.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. NetworkFlowMonitor / Client / stop_query_workload_insights_top_contributors stop_query_workload_insights_top_contributors ********************************************* NetworkFlowMonitor.Client.stop_query_workload_insights_top_contributors(**kwargs) Stop a top contributors query for workload insights. Specify the query that you want to stop by providing a query ID and a scope ID. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.stop_query_workload_insights_top_contributors( scopeId='string', queryId='string' ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / stop_query_monitor_top_contributors stop_query_monitor_top_contributors *********************************** NetworkFlowMonitor.Client.stop_query_monitor_top_contributors(**kwargs) Stop a top contributors query for a monitor. Specify the query that you want to stop by providing a query ID and a monitor name. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.stop_query_monitor_top_contributors( monitorName='string', queryId='string' ) Parameters: * **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / start_query_workload_insights_top_contributors start_query_workload_insights_top_contributors ********************************************** NetworkFlowMonitor.Client.start_query_workload_insights_top_contributors(**kwargs) Create a query with the Network Flow Monitor query interface that you can run to return workload insights top contributors. Specify the scope that you want to create a query for. The call returns a query ID that you can use with GetQueryResultsWorkloadInsightsTopContributors to run the query and return the top contributors for the workload insights for a scope. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable APIs for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.start_query_workload_insights_top_contributors( scopeId='string', startTime=datetime(2015, 1, 1), endTime=datetime(2015, 1, 1), metricName='TIMEOUTS'|'RETRANSMISSIONS'|'DATA_TRANSFERRED', destinationCategory='INTRA_AZ'|'INTER_AZ'|'INTER_VPC'|'UNCLASSIFIED'|'AMAZON_S3'|'AMAZON_DYNAMODB', limit=123 ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. A scope ID is returned from a "CreateScope" API call. * **startTime** (*datetime*) -- **[REQUIRED]** The timestamp that is the date and time beginning of the period that you want to retrieve results for with your query. * **endTime** (*datetime*) -- **[REQUIRED]** The timestamp that is the date and time end of the period that you want to retrieve results for with your query. * **metricName** (*string*) -- **[REQUIRED]** The metric that you want to query top contributors for. That is, you can specify this metric to return the top contributor network flows, for this type of metric, for a monitor and (optionally) within a specific category, such as network flows between Availability Zones. * **destinationCategory** (*string*) -- **[REQUIRED]** The destination category for a top contributors row. Destination categories can be one of the following: * "INTRA_AZ": Top contributor network flows within a single Availability Zone * "INTER_AZ": Top contributor network flows between Availability Zones * "INTER_VPC": Top contributor network flows between VPCs * "AWS_SERVICES": Top contributor network flows to or from Amazon Web Services services * "UNCLASSIFIED": Top contributor network flows that do not have a bucket classification * **limit** (*integer*) -- The maximum number of top contributors to return. Return type: dict Returns: **Response Syntax** { 'queryId': 'string' } **Response Structure** * *(dict) --* * **queryId** *(string) --* The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to start a query. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / list_scopes list_scopes *********** NetworkFlowMonitor.Client.list_scopes(**kwargs) List all the scopes for an account. See also: AWS API Documentation **Request Syntax** response = client.list_scopes( nextToken='string', maxResults=123 ) Parameters: * **nextToken** (*string*) -- The token for the next set of results. You receive this token from a previous call. * **maxResults** (*integer*) -- The number of query results that you want to return with this call. Return type: dict Returns: **Response Syntax** { 'scopes': [ { 'scopeId': 'string', 'status': 'SUCCEEDED'|'IN_PROGRESS'|'FAILED'|'DEACTIVATING'|'DEACTIVATED', 'scopeArn': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **scopes** *(list) --* The scopes returned by the call. * *(dict) --* A summary of information about a scope, including the ARN, target ID, and Amazon Web Services Region. * **scopeId** *(string) --* The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account. * **status** *(string) --* The status for a scope. The status can be one of the following: "SUCCEEDED", "IN_PROGRESS", "FAILED", "DEACTIVATING", or "DEACTIVATED". A status of "DEACTIVATING" means that you've requested a scope to be deactivated and Network Flow Monitor is in the process of deactivating the scope. A status of "DEACTIVATED" means that the deactivating process is complete. * **scopeArn** *(string) --* The Amazon Resource Name (ARN) of the scope. * **nextToken** *(string) --* The token for the next set of results. You receive this token from a previous call. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / delete_scope delete_scope ************ NetworkFlowMonitor.Client.delete_scope(**kwargs) Deletes a scope that has been defined. See also: AWS API Documentation **Request Syntax** response = client.delete_scope( scopeId='string' ) Parameters: **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ConflictException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / list_monitors list_monitors ************* NetworkFlowMonitor.Client.list_monitors(**kwargs) List all monitors in an account. Optionally, you can list only monitors that have a specific status, by using the "STATUS" parameter. See also: AWS API Documentation **Request Syntax** response = client.list_monitors( nextToken='string', maxResults=123, monitorStatus='PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING' ) Parameters: * **nextToken** (*string*) -- The token for the next set of results. You receive this token from a previous call. * **maxResults** (*integer*) -- The number of query results that you want to return with this call. * **monitorStatus** (*string*) -- The status of a monitor. The status can be one of the following * "PENDING": The monitor is in the process of being created. * "ACTIVE": The monitor is active. * "INACTIVE": The monitor is inactive. * "ERROR": Monitor creation failed due to an error. * "DELETING": The monitor is in the process of being deleted. Return type: dict Returns: **Response Syntax** { 'monitors': [ { 'monitorArn': 'string', 'monitorName': 'string', 'monitorStatus': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **monitors** *(list) --* The monitors that are in an account. * *(dict) --* A summary of information about a monitor, includ the ARN, the name, and the status. * **monitorArn** *(string) --* The Amazon Resource Name (ARN) of the monitor. * **monitorName** *(string) --* The name of the monitor. * **monitorStatus** *(string) --* The status of a monitor. The status can be one of the following * "PENDING": The monitor is in the process of being created. * "ACTIVE": The monitor is active. * "INACTIVE": The monitor is inactive. * "ERROR": Monitor creation failed due to an error. * "DELETING": The monitor is in the process of being deleted. * **nextToken** *(string) --* The token for the next set of results. You receive this token from a previous call. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / list_tags_for_resource list_tags_for_resource ********************** NetworkFlowMonitor.Client.list_tags_for_resource(**kwargs) Returns all the tags for a resource. See also: AWS API Documentation **Request Syntax** response = client.list_tags_for_resource( resourceArn='string' ) Parameters: **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. Return type: dict Returns: **Response Syntax** { 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **tags** *(dict) --* The tags for a resource. * *(string) --* * *(string) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ConflictException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / get_monitor get_monitor *********** NetworkFlowMonitor.Client.get_monitor(**kwargs) Gets information about a monitor in Network Flow Monitor based on a monitor name. The information returned includes the Amazon Resource Name (ARN), create time, modified time, resources included in the monitor, and status information. See also: AWS API Documentation **Request Syntax** response = client.get_monitor( monitorName='string' ) Parameters: **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. Return type: dict Returns: **Response Syntax** { 'monitorArn': 'string', 'monitorName': 'string', 'monitorStatus': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING', 'localResources': [ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet', 'identifier': 'string' }, ], 'remoteResources': [ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet'|'AWS::AWSService', 'identifier': 'string' }, ], 'createdAt': datetime(2015, 1, 1), 'modifiedAt': datetime(2015, 1, 1), 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **monitorArn** *(string) --* The Amazon Resource Name (ARN) of the monitor. * **monitorName** *(string) --* The name of the monitor. * **monitorStatus** *(string) --* The status of a monitor. The status can be one of the following * "PENDING": The monitor is in the process of being created. * "ACTIVE": The monitor is active. * "INACTIVE": The monitor is inactive. * "ERROR": Monitor creation failed due to an error. * "DELETING": The monitor is in the process of being deleted. * **localResources** *(list) --* The local resources for this monitor. * *(dict) --* A local resource is the host where the agent is installed. Local resources can be a a subnet, a VPC, or an Availability Zone. * **type** *(string) --* The type of the local resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone" or "AWS::EC2::Subnet". * **identifier** *(string) --* The identifier of the local resource, such as an ARN. * **remoteResources** *(list) --* The remote resources for this monitor. * *(dict) --* A remote resource is the other endpoint in a network flow. That is, one endpoint is the local resource and the other is the remote resource. Remote resources can be a a subnet, a VPC, an Availability Zone, or an Amazon Web Services service. * **type** *(string) --* The type of the remote resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone", "AWS::EC2::Subnet", or "AWS::AWSService". * **identifier** *(string) --* The identifier of the remote resource, such as an ARN. * **createdAt** *(datetime) --* The date and time when the monitor was created. * **modifiedAt** *(datetime) --* The date and time when the monitor was last modified. * **tags** *(dict) --* The tags for a monitor. * *(string) --* * *(string) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / untag_resource untag_resource ************** NetworkFlowMonitor.Client.untag_resource(**kwargs) Removes a tag from a resource. See also: AWS API Documentation **Request Syntax** response = client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. * **tagKeys** (*list*) -- **[REQUIRED]** Keys that you specified when you tagged a resource. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ConflictException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / get_waiter get_waiter ********** NetworkFlowMonitor.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" NetworkFlowMonitor / Client / start_query_monitor_top_contributors start_query_monitor_top_contributors ************************************ NetworkFlowMonitor.Client.start_query_monitor_top_contributors(**kwargs) Create a query that you can use with the Network Flow Monitor query interface to return the top contributors for a monitor. Specify the monitor that you want to create the query for. The call returns a query ID that you can use with GetQueryResultsMonitorTopContributors to run the query and return the top contributors for a specific monitor. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable APIs for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.start_query_monitor_top_contributors( monitorName='string', startTime=datetime(2015, 1, 1), endTime=datetime(2015, 1, 1), metricName='ROUND_TRIP_TIME'|'TIMEOUTS'|'RETRANSMISSIONS'|'DATA_TRANSFERRED', destinationCategory='INTRA_AZ'|'INTER_AZ'|'INTER_VPC'|'UNCLASSIFIED'|'AMAZON_S3'|'AMAZON_DYNAMODB', limit=123 ) Parameters: * **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. * **startTime** (*datetime*) -- **[REQUIRED]** The timestamp that is the date and time beginning of the period that you want to retrieve results for with your query. * **endTime** (*datetime*) -- **[REQUIRED]** The timestamp that is the date and time end of the period that you want to retrieve results for with your query. * **metricName** (*string*) -- **[REQUIRED]** The metric that you want to query top contributors for. That is, you can specify a metric with this call and return the top contributor network flows, for that type of metric, for a monitor and (optionally) within a specific category, such as network flows between Availability Zones. * **destinationCategory** (*string*) -- **[REQUIRED]** The category that you want to query top contributors for, for a specific monitor. Destination categories can be one of the following: * "INTRA_AZ": Top contributor network flows within a single Availability Zone * "INTER_AZ": Top contributor network flows between Availability Zones * "INTER_VPC": Top contributor network flows between VPCs * "AMAZON_S3": Top contributor network flows to or from Amazon S3 * "AMAZON_DYNAMODB": Top contributor network flows to or from Amazon Dynamo DB * "UNCLASSIFIED": Top contributor network flows that do not have a bucket classification * **limit** (*integer*) -- The maximum number of top contributors to return. Return type: dict Returns: **Response Syntax** { 'queryId': 'string' } **Response Structure** * *(dict) --* * **queryId** *(string) --* The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to start a query. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / start_query_workload_insights_top_contributors_data start_query_workload_insights_top_contributors_data *************************************************** NetworkFlowMonitor.Client.start_query_workload_insights_top_contributors_data(**kwargs) Create a query with the Network Flow Monitor query interface that you can run to return data for workload insights top contributors. Specify the scope that you want to create a query for. The call returns a query ID that you can use with GetQueryResultsWorkloadInsightsTopContributorsData to run the query and return the data for the top contributors for the workload insights for a scope. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.start_query_workload_insights_top_contributors_data( scopeId='string', startTime=datetime(2015, 1, 1), endTime=datetime(2015, 1, 1), metricName='TIMEOUTS'|'RETRANSMISSIONS'|'DATA_TRANSFERRED', destinationCategory='INTRA_AZ'|'INTER_AZ'|'INTER_VPC'|'UNCLASSIFIED'|'AMAZON_S3'|'AMAZON_DYNAMODB' ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **startTime** (*datetime*) -- **[REQUIRED]** The timestamp that is the date and time beginning of the period that you want to retrieve results for with your query. * **endTime** (*datetime*) -- **[REQUIRED]** The timestamp that is the date and time end of the period that you want to retrieve results for with your query. * **metricName** (*string*) -- **[REQUIRED]** The metric that you want to query top contributors for. That is, you can specify this metric to return the top contributor network flows, for this type of metric, for a monitor and (optionally) within a specific category, such as network flows between Availability Zones. * **destinationCategory** (*string*) -- **[REQUIRED]** The destination category for a top contributors. Destination categories can be one of the following: * "INTRA_AZ": Top contributor network flows within a single Availability Zone * "INTER_AZ": Top contributor network flows between Availability Zones * "INTER_VPC": Top contributor network flows between VPCs * "AWS_SERVICES": Top contributor network flows to or from Amazon Web Services services * "UNCLASSIFIED": Top contributor network flows that do not have a bucket classification Return type: dict Returns: **Response Syntax** { 'queryId': 'string' } **Response Structure** * *(dict) --* * **queryId** *(string) --* The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to start a query. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / delete_monitor delete_monitor ************** NetworkFlowMonitor.Client.delete_monitor(**kwargs) Deletes a monitor in Network Flow Monitor. See also: AWS API Documentation **Request Syntax** response = client.delete_monitor( monitorName='string' ) Parameters: **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor to delete. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / get_query_status_workload_insights_top_contributors_data get_query_status_workload_insights_top_contributors_data ******************************************************** NetworkFlowMonitor.Client.get_query_status_workload_insights_top_contributors_data(**kwargs) Returns the current status of a query for the Network Flow Monitor query interface, for a specified query ID and monitor. This call returns the query status for the top contributors data for workload insights. When you start a query, use this call to check the status of the query to make sure that it has has "SUCCEEDED" before you review the results. Use the same query ID that you used for the corresponding API call to start the query, "StartQueryWorkloadInsightsTopContributorsData". Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. The top contributor network flows overall are for a specific metric type, for example, the number of retransmissions. See also: AWS API Documentation **Request Syntax** response = client.get_query_status_workload_insights_top_contributors_data( scopeId='string', queryId='string' ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. A scope ID is returned from a "CreateScope" API call. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to start a query. Return type: dict Returns: **Response Syntax** { 'status': 'QUEUED'|'RUNNING'|'SUCCEEDED'|'FAILED'|'CANCELED' } **Response Structure** * *(dict) --* * **status** *(string) --* The status of a query for top contributors data. * "QUEUED": The query is scheduled to run. * "RUNNING": The query is in progress but not complete. * "SUCCEEDED": The query completed sucessfully. * "FAILED": The query failed due to an error. * "CANCELED": The query was canceled. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / get_query_status_workload_insights_top_contributors get_query_status_workload_insights_top_contributors *************************************************** NetworkFlowMonitor.Client.get_query_status_workload_insights_top_contributors(**kwargs) Return the data for a query with the Network Flow Monitor query interface. Specify the query that you want to return results for by providing a query ID and a monitor name. This query returns the top contributors for workload insights. When you start a query, use this call to check the status of the query to make sure that it has has "SUCCEEDED" before you review the results. Use the same query ID that you used for the corresponding API call to start the query, "StartQueryWorkloadInsightsTopContributors". Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.get_query_status_workload_insights_top_contributors( scopeId='string', queryId='string' ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to start a query. Return type: dict Returns: **Response Syntax** { 'status': 'QUEUED'|'RUNNING'|'SUCCEEDED'|'FAILED'|'CANCELED' } **Response Structure** * *(dict) --* * **status** *(string) --* When you run a query, use this call to check the status of the query to make sure that the query has "SUCCEEDED" before you review the results. * "QUEUED": The query is scheduled to run. * "RUNNING": The query is in progress but not complete. * "SUCCEEDED": The query completed sucessfully. * "FAILED": The query failed due to an error. * "CANCELED": The query was canceled. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / create_monitor create_monitor ************** NetworkFlowMonitor.Client.create_monitor(**kwargs) Create a monitor for specific network flows between local and remote resources, so that you can monitor network performance for one or several of your workloads. For each monitor, Network Flow Monitor publishes detailed end-to-end performance metrics and a network health indicators (NHI) that informs you whether there were Amazon Web Services network issues for one or more of the network flows tracked by a monitor, during a time period that you choose. See also: AWS API Documentation **Request Syntax** response = client.create_monitor( monitorName='string', localResources=[ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet', 'identifier': 'string' }, ], remoteResources=[ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet'|'AWS::AWSService', 'identifier': 'string' }, ], scopeArn='string', clientToken='string', tags={ 'string': 'string' } ) Parameters: * **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. * **localResources** (*list*) -- **[REQUIRED]** The local resources to monitor. A local resource, in a bi- directional flow of a workload, is the host where the agent is installed. For example, if a workload consists of an interaction between a web service and a backend database (for example, Amazon Relational Database Service (RDS)), the EC2 instance hosting the web service, which also runs the agent, is the local resource. * *(dict) --* A local resource is the host where the agent is installed. Local resources can be a a subnet, a VPC, or an Availability Zone. * **type** *(string) --* **[REQUIRED]** The type of the local resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone" or "AWS::EC2::Subnet". * **identifier** *(string) --* **[REQUIRED]** The identifier of the local resource, such as an ARN. * **remoteResources** (*list*) -- The remote resources to monitor. A remote resource is the other endpoint in the bi-directional flow of a workload, with a local resource. For example, Amazon Relational Database Service (RDS) can be a remote resource. * *(dict) --* A remote resource is the other endpoint in a network flow. That is, one endpoint is the local resource and the other is the remote resource. Remote resources can be a a subnet, a VPC, an Availability Zone, or an Amazon Web Services service. * **type** *(string) --* **[REQUIRED]** The type of the remote resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone", "AWS::EC2::Subnet", or "AWS::AWSService". * **identifier** *(string) --* **[REQUIRED]** The identifier of the remote resource, such as an ARN. * **scopeArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the scope for the monitor. * **clientToken** (*string*) -- A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don't reuse the same client token for other API requests. This field is autopopulated if not provided. * **tags** (*dict*) -- The tags for a monitor. You can add a maximum of 200 tags. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'monitorArn': 'string', 'monitorName': 'string', 'monitorStatus': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING', 'localResources': [ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet', 'identifier': 'string' }, ], 'remoteResources': [ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet'|'AWS::AWSService', 'identifier': 'string' }, ], 'createdAt': datetime(2015, 1, 1), 'modifiedAt': datetime(2015, 1, 1), 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **monitorArn** *(string) --* The Amazon Resource Name (ARN) of the monitor. * **monitorName** *(string) --* The name of the monitor. * **monitorStatus** *(string) --* The status of a monitor. The status can be one of the following * "PENDING": The monitor is in the process of being created. * "ACTIVE": The monitor is active. * "INACTIVE": The monitor is inactive. * "ERROR": Monitor creation failed due to an error. * "DELETING": The monitor is in the process of being deleted. * **localResources** *(list) --* The local resources to monitor. A local resource, in a bi- directional flow of a workload, is the host where the agent is installed. * *(dict) --* A local resource is the host where the agent is installed. Local resources can be a a subnet, a VPC, or an Availability Zone. * **type** *(string) --* The type of the local resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone" or "AWS::EC2::Subnet". * **identifier** *(string) --* The identifier of the local resource, such as an ARN. * **remoteResources** *(list) --* The remote resources to monitor. A remote resource is the other endpoint in the bi-directional flow of a workload, with a local resource. For example, Amazon Relational Database Service (RDS) can be a remote resource. The remote resource is identified by its ARN or an identifier. * *(dict) --* A remote resource is the other endpoint in a network flow. That is, one endpoint is the local resource and the other is the remote resource. Remote resources can be a a subnet, a VPC, an Availability Zone, or an Amazon Web Services service. * **type** *(string) --* The type of the remote resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone", "AWS::EC2::Subnet", or "AWS::AWSService". * **identifier** *(string) --* The identifier of the remote resource, such as an ARN. * **createdAt** *(datetime) --* The date and time when the monitor was created. * **modifiedAt** *(datetime) --* The last date and time that the monitor was modified. * **tags** *(dict) --* The tags for a monitor. * *(string) --* * *(string) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ConflictException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / update_scope update_scope ************ NetworkFlowMonitor.Client.update_scope(**kwargs) Update a scope to add or remove resources that you want to be available for Network Flow Monitor to generate metrics for, when you have active agents on those resources sending metrics reports to the Network Flow Monitor backend. See also: AWS API Documentation **Request Syntax** response = client.update_scope( scopeId='string', resourcesToAdd=[ { 'targetIdentifier': { 'targetId': { 'accountId': 'string' }, 'targetType': 'ACCOUNT' }, 'region': 'string' }, ], resourcesToDelete=[ { 'targetIdentifier': { 'targetId': { 'accountId': 'string' }, 'targetType': 'ACCOUNT' }, 'region': 'string' }, ] ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **resourcesToAdd** (*list*) -- A list of resources to add to a scope. * *(dict) --* A target resource in a scope. The resource is identified by a Region and a target identifier, which includes a target ID and a target type. * **targetIdentifier** *(dict) --* **[REQUIRED]** A target identifier is a pair of identifying information for a resource that is included in a target. A target identifier includes the target ID and the target type. * **targetId** *(dict) --* **[REQUIRED]** The identifier for a target. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "accountId". * **accountId** *(string) --* The identifier for the account for a target. * **targetType** *(string) --* **[REQUIRED]** The type of a target. A target type is currently always "ACCOUNT" because a target is currently a single Amazon Web Services account. * **region** *(string) --* **[REQUIRED]** The Amazon Web Services Region where the target resource is located. * **resourcesToDelete** (*list*) -- A list of resources to delete from a scope. * *(dict) --* A target resource in a scope. The resource is identified by a Region and a target identifier, which includes a target ID and a target type. * **targetIdentifier** *(dict) --* **[REQUIRED]** A target identifier is a pair of identifying information for a resource that is included in a target. A target identifier includes the target ID and the target type. * **targetId** *(dict) --* **[REQUIRED]** The identifier for a target. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "accountId". * **accountId** *(string) --* The identifier for the account for a target. * **targetType** *(string) --* **[REQUIRED]** The type of a target. A target type is currently always "ACCOUNT" because a target is currently a single Amazon Web Services account. * **region** *(string) --* **[REQUIRED]** The Amazon Web Services Region where the target resource is located. Return type: dict Returns: **Response Syntax** { 'scopeId': 'string', 'status': 'SUCCEEDED'|'IN_PROGRESS'|'FAILED'|'DEACTIVATING'|'DEACTIVATED', 'scopeArn': 'string', 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **scopeId** *(string) --* The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **status** *(string) --* The status for a scope. The status can be one of the following: "SUCCEEDED", "IN_PROGRESS", "FAILED", "DEACTIVATING", or "DEACTIVATED". A status of "DEACTIVATING" means that you've requested a scope to be deactivated and Network Flow Monitor is in the process of deactivating the scope. A status of "DEACTIVATED" means that the deactivating process is complete. * **scopeArn** *(string) --* The Amazon Resource Name (ARN) of the scope. * **tags** *(dict) --* The tags for a scope. * *(string) --* * *(string) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ConflictException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / close close ***** NetworkFlowMonitor.Client.close() Closes underlying endpoint connections. NetworkFlowMonitor / Client / get_query_results_monitor_top_contributors get_query_results_monitor_top_contributors ****************************************** NetworkFlowMonitor.Client.get_query_results_monitor_top_contributors(**kwargs) Return the data for a query with the Network Flow Monitor query interface. You specify the query that you want to return results for by providing a query ID and a monitor name. This query returns the top contributors for a specific monitor. Create a query ID for this call by calling the corresponding API call to start the query, "StartQueryMonitorTopContributors". Use the scope ID that was returned for your account by "CreateScope". Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.get_query_results_monitor_top_contributors( monitorName='string', queryId='string', nextToken='string', maxResults=123 ) Parameters: * **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. * **nextToken** (*string*) -- The token for the next set of results. You receive this token from a previous call. * **maxResults** (*integer*) -- The number of query results that you want to return with this call. Return type: dict Returns: **Response Syntax** { 'unit': 'Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None', 'topContributors': [ { 'localIp': 'string', 'snatIp': 'string', 'localInstanceId': 'string', 'localVpcId': 'string', 'localRegion': 'string', 'localAz': 'string', 'localSubnetId': 'string', 'targetPort': 123, 'destinationCategory': 'INTRA_AZ'|'INTER_AZ'|'INTER_VPC'|'UNCLASSIFIED'|'AMAZON_S3'|'AMAZON_DYNAMODB', 'remoteVpcId': 'string', 'remoteRegion': 'string', 'remoteAz': 'string', 'remoteSubnetId': 'string', 'remoteInstanceId': 'string', 'remoteIp': 'string', 'dnatIp': 'string', 'value': 123, 'traversedConstructs': [ { 'componentId': 'string', 'componentType': 'string', 'componentArn': 'string', 'serviceName': 'string' }, ], 'kubernetesMetadata': { 'localServiceName': 'string', 'localPodName': 'string', 'localPodNamespace': 'string', 'remoteServiceName': 'string', 'remotePodName': 'string', 'remotePodNamespace': 'string' }, 'localInstanceArn': 'string', 'localSubnetArn': 'string', 'localVpcArn': 'string', 'remoteInstanceArn': 'string', 'remoteSubnetArn': 'string', 'remoteVpcArn': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **unit** *(string) --* The units for a metric returned by the query. * **topContributors** *(list) --* The top contributor network flows overall for a specific metric type, for example, the number of retransmissions. * *(dict) --* A set of information for a top contributor network flow in a monitor. In a monitor, Network Flow Monitor returns information about the network flows for top contributors for each metric. Top contributors are network flows with the top values for each metric type. * **localIp** *(string) --* The IP address of the local resource for a top contributor network flow. * **snatIp** *(string) --* The secure network address translation (SNAT) IP address for a top contributor network flow. * **localInstanceId** *(string) --* The instance identifier for the local resource for a top contributor network flow. * **localVpcId** *(string) --* The VPC ID for a top contributor network flow for the local resource. * **localRegion** *(string) --* The Amazon Web Services Region for the local resource for a top contributor network flow. * **localAz** *(string) --* The Availability Zone for the local resource for a top contributor network flow. * **localSubnetId** *(string) --* The subnet ID for the local resource for a top contributor network flow. * **targetPort** *(integer) --* The target port. * **destinationCategory** *(string) --* The destination category for a top contributors row. Destination categories can be one of the following: * "INTRA_AZ": Top contributor network flows within a single Availability Zone * "INTER_AZ": Top contributor network flows between Availability Zones * "INTER_VPC": Top contributor network flows between VPCs * "AWS_SERVICES": Top contributor network flows to or from Amazon Web Services services * "UNCLASSIFIED": Top contributor network flows that do not have a bucket classification * **remoteVpcId** *(string) --* The VPC ID for a top contributor network flow for the remote resource. * **remoteRegion** *(string) --* The Amazon Web Services Region for the remote resource for a top contributor network flow. * **remoteAz** *(string) --* The Availability Zone for the remote resource for a top contributor network flow. * **remoteSubnetId** *(string) --* The subnet ID for the remote resource for a top contributor network flow. * **remoteInstanceId** *(string) --* The instance identifier for the remote resource for a top contributor network flow. * **remoteIp** *(string) --* The IP address of the remote resource for a top contributor network flow. * **dnatIp** *(string) --* The destination network address translation (DNAT) IP address for a top contributor network flow. * **value** *(integer) --* The value of the metric for a top contributor network flow. * **traversedConstructs** *(list) --* The constructs traversed by a network flow. * *(dict) --* A section of the network that a network flow has traveled through. * **componentId** *(string) --* The identifier for the traversed component. * **componentType** *(string) --* The type of component that was traversed. * **componentArn** *(string) --* The Amazon Resource Name (ARN) of a tranversed component. * **serviceName** *(string) --* The service name for the traversed component. * **kubernetesMetadata** *(dict) --* Meta data about Kubernetes resources. * **localServiceName** *(string) --* The service name for a local resource. * **localPodName** *(string) --* The name of the pod for a local resource. * **localPodNamespace** *(string) --* The namespace of the pod for a local resource. * **remoteServiceName** *(string) --* The service name for a remote resource. * **remotePodName** *(string) --* The name of the pod for a remote resource. * **remotePodNamespace** *(string) --* The namespace of the pod for a remote resource. * **localInstanceArn** *(string) --* The Amazon Resource Name (ARN) of a local resource. * **localSubnetArn** *(string) --* The Amazon Resource Name (ARN) of a local subnet. * **localVpcArn** *(string) --* The Amazon Resource Name (ARN) of a local VPC. * **remoteInstanceArn** *(string) --* The Amazon Resource Name (ARN) of a remote resource. * **remoteSubnetArn** *(string) --* The Amazon Resource Name (ARN) of a remote subnet. * **remoteVpcArn** *(string) --* The Amazon Resource Name (ARN) of a remote VPC. * **nextToken** *(string) --* The token for the next set of results. You receive this token from a previous call. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / create_scope create_scope ************ NetworkFlowMonitor.Client.create_scope(**kwargs) Create a scope of resources that you want to be available for Network Flow Monitor to generate metrics for, when you have active agents on those resources sending metrics reports to the Network Flow Monitor backend. This call returns a scope ID to identify the scope. When you create a scope, you enable permissions for Network Flow Monitor. The scope is set to the resources for the Amazon Web Services that enables the feature. See also: AWS API Documentation **Request Syntax** response = client.create_scope( targets=[ { 'targetIdentifier': { 'targetId': { 'accountId': 'string' }, 'targetType': 'ACCOUNT' }, 'region': 'string' }, ], clientToken='string', tags={ 'string': 'string' } ) Parameters: * **targets** (*list*) -- **[REQUIRED]** The targets to define the scope to be monitored. Currently, a target is an Amazon Web Services account. * *(dict) --* A target resource in a scope. The resource is identified by a Region and a target identifier, which includes a target ID and a target type. * **targetIdentifier** *(dict) --* **[REQUIRED]** A target identifier is a pair of identifying information for a resource that is included in a target. A target identifier includes the target ID and the target type. * **targetId** *(dict) --* **[REQUIRED]** The identifier for a target. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "accountId". * **accountId** *(string) --* The identifier for the account for a target. * **targetType** *(string) --* **[REQUIRED]** The type of a target. A target type is currently always "ACCOUNT" because a target is currently a single Amazon Web Services account. * **region** *(string) --* **[REQUIRED]** The Amazon Web Services Region where the target resource is located. * **clientToken** (*string*) -- A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don't reuse the same client token for other API requests. This field is autopopulated if not provided. * **tags** (*dict*) -- The tags for a scope. You can add a maximum of 200 tags. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'scopeId': 'string', 'status': 'SUCCEEDED'|'IN_PROGRESS'|'FAILED'|'DEACTIVATING'|'DEACTIVATED', 'scopeArn': 'string', 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **scopeId** *(string) --* The identifier for the scope that includes the resources you want to get metrics for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **status** *(string) --* The status for a scope. The status can be one of the following: "SUCCEEDED", "IN_PROGRESS", "FAILED", "DEACTIVATING", or "DEACTIVATED". A status of "DEACTIVATING" means that you've requested a scope to be deactivated and Network Flow Monitor is in the process of deactivating the scope. A status of "DEACTIVATED" means that the deactivating process is complete. * **scopeArn** *(string) --* The Amazon Resource Name (ARN) of the scope. * **tags** *(dict) --* The tags for a scope. * *(string) --* * *(string) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ConflictException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / stop_query_workload_insights_top_contributors_data stop_query_workload_insights_top_contributors_data ************************************************** NetworkFlowMonitor.Client.stop_query_workload_insights_top_contributors_data(**kwargs) Stop a top contributors data query for workload insights. Specify the query that you want to stop by providing a query ID and a scope ID. Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.stop_query_workload_insights_top_contributors_data( scopeId='string', queryId='string' ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / tag_resource tag_resource ************ NetworkFlowMonitor.Client.tag_resource(**kwargs) Adds a tag to a resource. See also: AWS API Documentation **Request Syntax** response = client.tag_resource( resourceArn='string', tags={ 'string': 'string' } ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. * **tags** (*dict*) -- **[REQUIRED]** The tags for a resource. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ConflictException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / get_scope get_scope ********* NetworkFlowMonitor.Client.get_scope(**kwargs) Gets information about a scope, including the name, status, tags, and target details. The scope in Network Flow Monitor is an account. See also: AWS API Documentation **Request Syntax** response = client.get_scope( scopeId='string' ) Parameters: **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. A scope ID is returned from a "CreateScope" API call. Return type: dict Returns: **Response Syntax** { 'scopeId': 'string', 'status': 'SUCCEEDED'|'IN_PROGRESS'|'FAILED'|'DEACTIVATING'|'DEACTIVATED', 'scopeArn': 'string', 'targets': [ { 'targetIdentifier': { 'targetId': { 'accountId': 'string' }, 'targetType': 'ACCOUNT' }, 'region': 'string' }, ], 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **scopeId** *(string) --* The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. A scope ID is returned from a "CreateScope" API call. * **status** *(string) --* The status for a scope. The status can be one of the following: "SUCCEEDED", "IN_PROGRESS", "FAILED", "DEACTIVATING", or "DEACTIVATED". A status of "DEACTIVATING" means that you've requested a scope to be deactivated and Network Flow Monitor is in the process of deactivating the scope. A status of "DEACTIVATED" means that the deactivating process is complete. * **scopeArn** *(string) --* The Amazon Resource Name (ARN) of the scope. * **targets** *(list) --* The targets for a scope * *(dict) --* A target resource in a scope. The resource is identified by a Region and a target identifier, which includes a target ID and a target type. * **targetIdentifier** *(dict) --* A target identifier is a pair of identifying information for a resource that is included in a target. A target identifier includes the target ID and the target type. * **targetId** *(dict) --* The identifier for a target. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "accountId". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **accountId** *(string) --* The identifier for the account for a target. * **targetType** *(string) --* The type of a target. A target type is currently always "ACCOUNT" because a target is currently a single Amazon Web Services account. * **region** *(string) --* The Amazon Web Services Region where the target resource is located. * **tags** *(dict) --* The tags for a scope. * *(string) --* * *(string) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / get_query_status_monitor_top_contributors get_query_status_monitor_top_contributors ***************************************** NetworkFlowMonitor.Client.get_query_status_monitor_top_contributors(**kwargs) Returns the current status of a query for the Network Flow Monitor query interface, for a specified query ID and monitor. This call returns the query status for the top contributors for a monitor. When you create a query, use this call to check the status of the query to make sure that it has has "SUCCEEDED" before you review the results. Use the same query ID that you used for the corresponding API call to start (create) the query, "StartQueryMonitorTopContributors". When you run a query, use this call to check the status of the query to make sure that the query has "SUCCEEDED" before you review the results. See also: AWS API Documentation **Request Syntax** response = client.get_query_status_monitor_top_contributors( monitorName='string', queryId='string' ) Parameters: * **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to start a query. Return type: dict Returns: **Response Syntax** { 'status': 'QUEUED'|'RUNNING'|'SUCCEEDED'|'FAILED'|'CANCELED' } **Response Structure** * *(dict) --* * **status** *(string) --* When you run a query, use this call to check the status of the query to make sure that the query has "SUCCEEDED" before you review the results. * "QUEUED": The query is scheduled to run. * "RUNNING": The query is in progress but not complete. * "SUCCEEDED": The query completed sucessfully. * "FAILED": The query failed due to an error. * "CANCELED": The query was canceled. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / get_query_results_workload_insights_top_contributors get_query_results_workload_insights_top_contributors **************************************************** NetworkFlowMonitor.Client.get_query_results_workload_insights_top_contributors(**kwargs) Return the data for a query with the Network Flow Monitor query interface. You specify the query that you want to return results for by providing a query ID and a monitor name. This query returns the top contributors for a scope for workload insights. Workload insights provide a high level view of network flow performance data collected by agents. To return the data for the top contributors, see "GetQueryResultsWorkloadInsightsTopContributorsData". Create a query ID for this call by calling the corresponding API call to start the query, "StartQueryWorkloadInsightsTopContributors". Use the scope ID that was returned for your account by "CreateScope". Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable call for the top contributors that you want to be returned. See also: AWS API Documentation **Request Syntax** response = client.get_query_results_workload_insights_top_contributors( scopeId='string', queryId='string', nextToken='string', maxResults=123 ) Parameters: * **scopeId** (*string*) -- **[REQUIRED]** The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally- generated identifier that includes all the resources for a specific root account. * **queryId** (*string*) -- **[REQUIRED]** The identifier for the query. A query ID is an internally- generated identifier for a specific query returned from an API call to create a query. * **nextToken** (*string*) -- The token for the next set of results. You receive this token from a previous call. * **maxResults** (*integer*) -- The number of query results that you want to return with this call. Return type: dict Returns: **Response Syntax** { 'topContributors': [ { 'accountId': 'string', 'localSubnetId': 'string', 'localAz': 'string', 'localVpcId': 'string', 'localRegion': 'string', 'remoteIdentifier': 'string', 'value': 123, 'localSubnetArn': 'string', 'localVpcArn': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **topContributors** *(list) --* The top contributor network flows overall for a specific metric type, for example, the number of retransmissions. * *(dict) --* A row for a top contributor for a scope. * **accountId** *(string) --* The account ID for a specific row of data. * **localSubnetId** *(string) --* The subnet identifier for the local resource. * **localAz** *(string) --* The identifier for the Availability Zone where the local resource is located. * **localVpcId** *(string) --* The identifier for the VPC for the local resource. * **localRegion** *(string) --* The Amazon Web Services Region where the local resource is located. * **remoteIdentifier** *(string) --* The identifier of a remote resource. * **value** *(integer) --* The value for a metric. * **localSubnetArn** *(string) --* The Amazon Resource Name (ARN) of a local subnet. * **localVpcArn** *(string) --* The Amazon Resource Name (ARN) of a local VPC. * **nextToken** *(string) --* The token for the next set of results. You receive this token from a previous call. **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededExcept ion" * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException" NetworkFlowMonitor / Client / update_monitor update_monitor ************** NetworkFlowMonitor.Client.update_monitor(**kwargs) Update a monitor to add or remove local or remote resources. See also: AWS API Documentation **Request Syntax** response = client.update_monitor( monitorName='string', localResourcesToAdd=[ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet', 'identifier': 'string' }, ], localResourcesToRemove=[ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet', 'identifier': 'string' }, ], remoteResourcesToAdd=[ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet'|'AWS::AWSService', 'identifier': 'string' }, ], remoteResourcesToRemove=[ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet'|'AWS::AWSService', 'identifier': 'string' }, ], clientToken='string' ) Parameters: * **monitorName** (*string*) -- **[REQUIRED]** The name of the monitor. * **localResourcesToAdd** (*list*) -- The local resources to add, as an array of resources with identifiers and types. * *(dict) --* A local resource is the host where the agent is installed. Local resources can be a a subnet, a VPC, or an Availability Zone. * **type** *(string) --* **[REQUIRED]** The type of the local resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone" or "AWS::EC2::Subnet". * **identifier** *(string) --* **[REQUIRED]** The identifier of the local resource, such as an ARN. * **localResourcesToRemove** (*list*) -- The local resources to remove, as an array of resources with identifiers and types. * *(dict) --* A local resource is the host where the agent is installed. Local resources can be a a subnet, a VPC, or an Availability Zone. * **type** *(string) --* **[REQUIRED]** The type of the local resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone" or "AWS::EC2::Subnet". * **identifier** *(string) --* **[REQUIRED]** The identifier of the local resource, such as an ARN. * **remoteResourcesToAdd** (*list*) -- The remove resources to add, as an array of resources with identifiers and types. * *(dict) --* A remote resource is the other endpoint in a network flow. That is, one endpoint is the local resource and the other is the remote resource. Remote resources can be a a subnet, a VPC, an Availability Zone, or an Amazon Web Services service. * **type** *(string) --* **[REQUIRED]** The type of the remote resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone", "AWS::EC2::Subnet", or "AWS::AWSService". * **identifier** *(string) --* **[REQUIRED]** The identifier of the remote resource, such as an ARN. * **remoteResourcesToRemove** (*list*) -- The remove resources to remove, as an array of resources with identifiers and types. * *(dict) --* A remote resource is the other endpoint in a network flow. That is, one endpoint is the local resource and the other is the remote resource. Remote resources can be a a subnet, a VPC, an Availability Zone, or an Amazon Web Services service. * **type** *(string) --* **[REQUIRED]** The type of the remote resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone", "AWS::EC2::Subnet", or "AWS::AWSService". * **identifier** *(string) --* **[REQUIRED]** The identifier of the remote resource, such as an ARN. * **clientToken** (*string*) -- A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don't reuse the same client token for other API requests. This field is autopopulated if not provided. Return type: dict Returns: **Response Syntax** { 'monitorArn': 'string', 'monitorName': 'string', 'monitorStatus': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING', 'localResources': [ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet', 'identifier': 'string' }, ], 'remoteResources': [ { 'type': 'AWS::EC2::VPC'|'AWS::AvailabilityZone'|'AWS::EC2::Subnet'|'AWS::AWSService', 'identifier': 'string' }, ], 'createdAt': datetime(2015, 1, 1), 'modifiedAt': datetime(2015, 1, 1), 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **monitorArn** *(string) --* The Amazon Resource Name (ARN) of the monitor. * **monitorName** *(string) --* The name of the monitor. * **monitorStatus** *(string) --* The status of a monitor. The status can be one of the following * "PENDING": The monitor is in the process of being created. * "ACTIVE": The monitor is active. * "INACTIVE": The monitor is inactive. * "ERROR": Monitor creation failed due to an error. * "DELETING": The monitor is in the process of being deleted. * **localResources** *(list) --* The local resources updated for a monitor, as an array of resources with identifiers and types. * *(dict) --* A local resource is the host where the agent is installed. Local resources can be a a subnet, a VPC, or an Availability Zone. * **type** *(string) --* The type of the local resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone" or "AWS::EC2::Subnet". * **identifier** *(string) --* The identifier of the local resource, such as an ARN. * **remoteResources** *(list) --* The remote resources updated for a monitor, as an array of resources with identifiers and types. * *(dict) --* A remote resource is the other endpoint in a network flow. That is, one endpoint is the local resource and the other is the remote resource. Remote resources can be a a subnet, a VPC, an Availability Zone, or an Amazon Web Services service. * **type** *(string) --* The type of the remote resource. Valid values are "AWS::EC2::VPC" "AWS::AvailabilityZone", "AWS::EC2::Subnet", or "AWS::AWSService". * **identifier** *(string) --* The identifier of the remote resource, such as an ARN. * **createdAt** *(datetime) --* The date and time when the monitor was created. * **modifiedAt** *(datetime) --* The last date and time that the monitor was modified. * **tags** *(dict) --* The tags for a monitor. * *(string) --* * *(string) --* **Exceptions** * "NetworkFlowMonitor.Client.exceptions.ResourceNotFoundException" * "NetworkFlowMonitor.Client.exceptions.ValidationException" * "NetworkFlowMonitor.Client.exceptions.ThrottlingException" * "NetworkFlowMonitor.Client.exceptions.AccessDeniedException" * "NetworkFlowMonitor.Client.exceptions.InternalServerException"