2026/12/02 - AWS Network Manager - 10 new5 updated api methods
Changes Add new API operations for AWS Ops Agent for Networking, a networking specialist that runs inside AWS DevOps Agent to help you investigate and troubleshoot AWS networking issues. The new operations surface network security findings, look into network resources, manage network scope, and more.
Lists the principals associated with a network scope. Results are paginated. To get the next page of results, use NextToken.
See also: AWS API Documentation
Request Syntax
client.list_network_scope_principals(
NetworkScopeId='string',
Principals=[
'string',
],
MaxResults=123,
NextToken='string'
)
string
[REQUIRED]
The ID of the network scope.
list
The principals to return. Only principals that are associated with the network scope are returned, so a page can contain fewer than MaxResults principals and still include a NextToken. You can specify from 1 to 100 principals.
(string) --
integer
The maximum number of results to return. Valid values are from 1 to 500.
string
The token for the next page of results.
dict
Response Syntax
{
'NetworkScopePrincipals': [
{
'NetworkScopeId': 'string',
'Principal': 'string',
'PrincipalRegions': [
'string',
],
'State': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED'|'INACTIVE',
'StateReason': {
'Code': 'ORGANIZATION_ACCESS_LOST'|'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NOT_IN_OWNER_ORGANIZATION'|'ORGANIZATIONAL_UNIT_DELETED'|'NETWORK_MANAGER_SERVICE_LINKED_ROLE_NOT_ASSUMABLE'|'REGION_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'NETWORK_SECURITY_ANALYSIS_POLICY_ATTACHMENT_LIMIT_EXCEEDED',
'Message': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
NetworkScopePrincipals (list) --
Information about the principals.
(dict) --
Describes a principal associated with a network scope.
NetworkScopeId (string) --
The ID of the network scope.
Principal (string) --
The principal.
PrincipalRegions (list) --
The AWS Regions of the network scope. A principal always has all of the Regions of the network scope. If the account isn't covered in a Region for a reason that you must fix, StateReason says so.
(string) --
State (string) --
The state of the principal. The possible values are the following:
ASSOCIATING: The principal is being associated with the network scope.
ASSOCIATED: The principal is associated with the network scope.
FAILED: The principal isn't covered in any Region of the network scope. If you must fix the cause, StateReason describes it. The association is retried, and the principal becomes ASSOCIATED when it's covered in at least one Region.
DISASSOCIATING: The principal is being disassociated from the network scope.
DISASSOCIATED: The principal is disassociated from the network scope. The network scope then removes the principal, so ListNetworkScopePrincipals no longer returns it.
INACTIVE: The principal no longer qualifies for the network scope, because the account left the organization or the network scope's owner lost its standing in the organization. The network scope keeps the principal but doesn't cover it, and StateReason describes the cause. The principal returns to ASSOCIATING when the cause is resolved. This state applies only to network scopes with the ORGANIZATIONS access mode.
StateReason (dict) --
The reason for the current state of the principal. A reason is always returned for a principal in the INACTIVE state. For a principal in the FAILED state, or in the ASSOCIATED state when it covers only some of the Regions of the network scope, a reason is returned when the cause is one that you must fix. A reason is also returned for a principal in the DISASSOCIATING state when you must complete a prerequisite to finish removing it.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
NextToken (string) --
The token for the next page of results.
Lists the network scopes owned by your AWS account in the current Region. Results are paginated. To get the next page of results, use NextToken.
See also: AWS API Documentation
Request Syntax
client.list_network_scopes(
MaxResults=123,
NextToken='string'
)
integer
The maximum number of results to return. Valid values are from 1 to 500.
string
The token for the next page of results.
dict
Response Syntax
{
'NetworkScopes': [
{
'NetworkScopeId': 'string',
'NetworkScopeArn': 'string',
'Name': 'string',
'AccessMode': 'ACCOUNTS'|'ORGANIZATIONS',
'State': 'PENDING'|'AVAILABLE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED',
'StateReason': {
'Code': 'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NETWORK_SECURITY_ANALYSIS_SERVICE_ACCESS_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_TYPE_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'PRINCIPALS_NOT_FULLY_COVERED',
'Message': 'string'
},
'CreatedAt': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
NetworkScopes (list) --
Information about the network scopes.
(dict) --
Describes a network scope returned by ListNetworkScopes.
NetworkScopeId (string) --
The ID of the network scope.
NetworkScopeArn (string) --
The Amazon Resource Name (ARN) of the network scope.
Name (string) --
The name of the network scope.
AccessMode (string) --
How the network scope admits principals. Each principal must be the ID of an AWS account that has the AWS Network Manager service-linked role. With ACCOUNTS, the account can be any AWS account. With ORGANIZATIONS, the account that owns the network scope must be the management account or a delegated administrator for AWS Network Manager in its organization, and each principal must be an active member account of that organization. A delegated administrator can't add the management account. You choose the access mode when you create the network scope, and you can't change it.
State (string) --
The state of the network scope. To see the Regions of the network scope, call GetNetworkScope.
StateReason (dict) --
The reason for the current state of the network scope, if a reason applies.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
CreatedAt (datetime) --
The date and time that the network scope was created.
NextToken (string) --
The token for the next page of results.
Returns the routes that a core network policy version produces in a segment or network function group at an edge location. Each route shows how it changes compared to the current routes of the core network.
Before you call this operation, use StartCoreNetworkPolicyDryRun to start a dry run of the policy version, and wait for the dry run to reach the AVAILABLE state.
See also: AWS API Documentation
Request Syntax
client.list_core_network_dry_run_routes(
CoreNetworkId='string',
EdgeLocation='string',
SegmentName='string',
NetworkFunctionGroupName='string',
PolicyVersionId=123,
ExactCidrMatches=[
'string',
],
LongestPrefixMatches=[
'string',
],
SubnetOfMatches=[
'string',
],
SupernetOfMatches=[
'string',
],
PrefixListIds=[
'string',
],
States=[
'ACTIVE'|'BLACKHOLE'|'PENDING_DEPLOYMENT',
],
Types=[
'PROPAGATED'|'STATIC'|'SYSTEM',
],
DestinationFilters={
'string': [
'string',
]
},
DryRunChangeStates=[
'ADDED'|'REMOVED'|'UPDATED'|'NO_CHANGES',
],
IsOverlappingRoute=True|False,
MaxResults=123,
NextToken='string'
)
string
[REQUIRED]
The ID of the core network.
string
[REQUIRED]
The edge location to return routes for.
string
The name of the segment to return routes for. You must specify either SegmentName or NetworkFunctionGroupName, but not both.
string
The name of the network function group to return routes for. You must specify either SegmentName or NetworkFunctionGroupName, but not both.
integer
[REQUIRED]
The ID of the policy version that the dry run was started for.
list
The Classless Inter-Domain Routing (CIDR) blocks that the routes must exactly match. You can specify up to 10 values.
(string) --
list
The CIDR blocks for which to return the most specific route (longest prefix match). You can specify up to 10 values.
(string) --
list
The CIDR blocks that the CIDR blocks of the routes must be subnets of. You can specify up to 10 values.
(string) --
list
The CIDR blocks that the CIDR blocks of the routes must encompass. For example, if you specify 10.24.34.0/23, the results include 10.24.34.0/22. You can specify up to 10 values.
(string) --
list
The IDs of the prefix lists that the routes must belong to. You can specify up to 10 values.
(string) --
list
The states of the routes to return. You can specify up to 10 values.
(string) --
list
The types of the routes to return. You can specify up to 10 values.
(string) --
dict
Filters the routes by destination. Possible values: TRANSIT_GATEWAY_ATTACHMENT_ID, RESOURCE_ID, or RESOURCE_TYPE. You can specify up to 20 filters, with up to 20 values for each filter.
(string) --
(list) --
(string) --
list
The change states that the routes must have. For a description of each change state, see NetworkRoute$DryRunChangeState.
(string) --
boolean
Specifies whether to return only overlapping routes.
integer
The maximum number of results to return.
string
The token for the next page of results.
dict
Response Syntax
{
'NetworkRoutes': [
{
'DestinationCidrBlock': 'string',
'Destinations': [
{
'CoreNetworkAttachmentId': 'string',
'TransitGatewayAttachmentId': 'string',
'SegmentName': 'string',
'NetworkFunctionGroupName': 'string',
'EdgeLocation': 'string',
'ResourceType': 'string',
'ResourceId': 'string'
},
],
'PrefixListId': 'string',
'State': 'ACTIVE'|'BLACKHOLE'|'PENDING_DEPLOYMENT',
'Type': 'PROPAGATED'|'STATIC'|'SYSTEM',
'IsOverlappingRoute': True|False,
'DryRunChangeState': 'ADDED'|'REMOVED'|'UPDATED'|'NO_CHANGES'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
NetworkRoutes (list) --
The routes that the policy version produces.
(dict) --
Describes a network route.
DestinationCidrBlock (string) --
A unique identifier for the route, such as a CIDR block.
Destinations (list) --
The destinations.
(dict) --
Describes the destination of a network route.
CoreNetworkAttachmentId (string) --
The ID of a core network attachment.
TransitGatewayAttachmentId (string) --
The ID of the transit gateway attachment.
SegmentName (string) --
The name of the segment.
NetworkFunctionGroupName (string) --
The network function group name associated with the destination.
EdgeLocation (string) --
The edge location for the network destination.
ResourceType (string) --
The resource type.
ResourceId (string) --
The ID of the resource.
PrefixListId (string) --
The ID of the prefix list.
State (string) --
The route state. The possible values are ACTIVE, BLACKHOLE, and PENDING_DEPLOYMENT.
PENDING_DEPLOYMENT - The route might not be installed, because routing policies or service insertion act on an overlapping CIDR block. The route is resolved only after the policy version is deployed. Only ListCoreNetworkDryRunRoutes returns this value.
Type (string) --
The route type. The possible values are PROPAGATED, STATIC, and SYSTEM. A SYSTEM route is installed by the core network for the NAT CIDR block of an attachment's NAT rule.
IsOverlappingRoute (boolean) --
Indicates whether the route overlaps with another route, so that the route used to forward traffic can't be determined. Only ListCoreNetworkDryRunRoutes returns this value.
DryRunChangeState (string) --
How the route changes when the policy version is applied, compared to the current routes of the core network. Only ListCoreNetworkDryRunRoutes returns this value.
Possible values:
ADDED - The policy version adds the route.
REMOVED - The policy version removes the route.
UPDATED - The policy version changes the route.
NO_CHANGES - The policy version doesn't change the route.
NextToken (string) --
The token for the next page of results.
Disassociates a principal from a network scope. The network scope must be in the AVAILABLE state. This operation is idempotent: if the principal is already DISASSOCIATING, the operation returns it unchanged. When the removal is complete, the principal is deleted, and later requests return ResourceNotFoundException. The principal is returned in a transitional state. To track it, call ListNetworkScopePrincipals. An association becomes ASSOCIATED or FAILED. A disassociated principal is removed and is no longer returned.
See also: AWS API Documentation
Request Syntax
client.disassociate_network_scope_principal(
NetworkScopeId='string',
Principal='string'
)
string
[REQUIRED]
The ID of the network scope to disassociate the principal from.
string
[REQUIRED]
The principal to disassociate.
dict
Response Syntax
{
'NetworkScopeId': 'string',
'Principal': 'string',
'State': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED'|'INACTIVE',
'StateReason': {
'Code': 'ORGANIZATION_ACCESS_LOST'|'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NOT_IN_OWNER_ORGANIZATION'|'ORGANIZATIONAL_UNIT_DELETED'|'NETWORK_MANAGER_SERVICE_LINKED_ROLE_NOT_ASSUMABLE'|'REGION_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'NETWORK_SECURITY_ANALYSIS_POLICY_ATTACHMENT_LIMIT_EXCEEDED',
'Message': 'string'
}
}
Response Structure
(dict) --
NetworkScopeId (string) --
The ID of the network scope.
Principal (string) --
The principal.
State (string) --
The state of the principal, which is DISASSOCIATING while the principal is being removed.
StateReason (dict) --
The reason for the current state of the principal, if a reason applies. A reason is included only when the removal has already started and is blocked by a prerequisite that you must complete.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
Updates the name or the Regions of a network scope. You must specify at least one of Name or NetworkScopeRegions. The network scope must be in the AVAILABLE state. You can't change the access mode of a network scope.
A change to the Regions takes effect asynchronously, and the network scope is in the UPDATING state until the change is complete. A change to the name only takes effect immediately.
See also: AWS API Documentation
Request Syntax
client.update_network_scope(
NetworkScopeId='string',
Name='string',
NetworkScopeRegions=[
'string',
]
)
string
[REQUIRED]
The ID of the network scope to update.
string
The new name of the network scope. The name can be up to 128 characters long and can contain letters, numbers, and spaces, as well as the following characters: . _ : / + = @ -. If you omit this parameter, the name is unchanged.
list
The complete set of AWS Regions for the network scope. The Regions that you specify replace the existing Regions of the network scope. Each Region must be one where AWS Ops Agent for networking is available. If you omit this parameter, the Regions are unchanged.
(string) --
dict
Response Syntax
{
'NetworkScope': {
'NetworkScopeId': 'string',
'NetworkScopeArn': 'string',
'Name': 'string',
'AccessMode': 'ACCOUNTS'|'ORGANIZATIONS',
'NetworkScopeRegions': [
'string',
],
'State': 'PENDING'|'AVAILABLE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED',
'StateReason': {
'Code': 'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NETWORK_SECURITY_ANALYSIS_SERVICE_ACCESS_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_TYPE_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'PRINCIPALS_NOT_FULLY_COVERED',
'Message': 'string'
},
'CreatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
NetworkScope (dict) --
Information about the network scope.
NetworkScopeId (string) --
The ID of the network scope.
NetworkScopeArn (string) --
The Amazon Resource Name (ARN) of the network scope.
Name (string) --
The name of the network scope.
AccessMode (string) --
How the network scope admits principals. Each principal must be the ID of an AWS account that has the AWS Network Manager service-linked role. With ACCOUNTS, the account can be any AWS account. With ORGANIZATIONS, the account that owns the network scope must be the management account or a delegated administrator for AWS Network Manager in its organization, and each principal must be an active member account of that organization. A delegated administrator can't add the management account. You choose the access mode when you create the network scope, and you can't change it.
NetworkScopeRegions (list) --
The AWS Regions that the network scope covers.
(string) --
State (string) --
The state of the network scope. The possible values are the following:
PENDING: The network scope is being created.
AVAILABLE: The network scope is ready to use.
UPDATING: A change to the Regions of the network scope is being applied.
DELETING: The network scope is being deleted.
DELETED: The network scope is deleted. GetNetworkScope and ListNetworkScopes return it for 2 hours.
FAILED: A prerequisite that you must complete blocked the creation or the deletion of the network scope. The network scope isn't in use, StateReason describes what to complete, and deleting the network scope is the only way to leave this state. A change that's blocked by a prerequisite that you must complete leaves the network scope AVAILABLE with a StateReason. If a change fails for another reason, the network scope stays UPDATING while the change is retried.
StateReason (dict) --
The reason for the current state of the network scope. A FAILED network scope always has a reason. An AVAILABLE network scope has a reason when there's a prerequisite that you must complete. For an AVAILABLE network scope, the reason clears after you resolve the cause and the network scope is next checked. A FAILED network scope keeps its reason until you delete it.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
CreatedAt (datetime) --
The date and time that the network scope was created.
Deletes a network scope. You can delete a network scope that is in the AVAILABLE, UPDATING, or FAILED state. The response returns the network scope in the DELETING state. GetNetworkScope and ListNetworkScopes return the network scope while it's being deleted and for 2 hours after it's deleted. This operation is idempotent: if the network scope is already DELETING, or it became DELETED less than 2 hours ago, the operation returns it unchanged. After that, the operation returns ResourceNotFoundException.
See also: AWS API Documentation
Request Syntax
client.delete_network_scope(
NetworkScopeId='string'
)
string
[REQUIRED]
The ID of the network scope to delete.
dict
Response Syntax
{
'NetworkScope': {
'NetworkScopeId': 'string',
'NetworkScopeArn': 'string',
'Name': 'string',
'AccessMode': 'ACCOUNTS'|'ORGANIZATIONS',
'NetworkScopeRegions': [
'string',
],
'State': 'PENDING'|'AVAILABLE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED',
'StateReason': {
'Code': 'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NETWORK_SECURITY_ANALYSIS_SERVICE_ACCESS_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_TYPE_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'PRINCIPALS_NOT_FULLY_COVERED',
'Message': 'string'
},
'CreatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
NetworkScope (dict) --
Information about the network scope.
NetworkScopeId (string) --
The ID of the network scope.
NetworkScopeArn (string) --
The Amazon Resource Name (ARN) of the network scope.
Name (string) --
The name of the network scope.
AccessMode (string) --
How the network scope admits principals. Each principal must be the ID of an AWS account that has the AWS Network Manager service-linked role. With ACCOUNTS, the account can be any AWS account. With ORGANIZATIONS, the account that owns the network scope must be the management account or a delegated administrator for AWS Network Manager in its organization, and each principal must be an active member account of that organization. A delegated administrator can't add the management account. You choose the access mode when you create the network scope, and you can't change it.
NetworkScopeRegions (list) --
The AWS Regions that the network scope covers.
(string) --
State (string) --
The state of the network scope. The possible values are the following:
PENDING: The network scope is being created.
AVAILABLE: The network scope is ready to use.
UPDATING: A change to the Regions of the network scope is being applied.
DELETING: The network scope is being deleted.
DELETED: The network scope is deleted. GetNetworkScope and ListNetworkScopes return it for 2 hours.
FAILED: A prerequisite that you must complete blocked the creation or the deletion of the network scope. The network scope isn't in use, StateReason describes what to complete, and deleting the network scope is the only way to leave this state. A change that's blocked by a prerequisite that you must complete leaves the network scope AVAILABLE with a StateReason. If a change fails for another reason, the network scope stays UPDATING while the change is retried.
StateReason (dict) --
The reason for the current state of the network scope. A FAILED network scope always has a reason. An AVAILABLE network scope has a reason when there's a prerequisite that you must complete. For an AVAILABLE network scope, the reason clears after you resolve the cause and the network scope is next checked. A FAILED network scope keeps its reason until you delete it.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
CreatedAt (datetime) --
The date and time that the network scope was created.
Associates an AWS account with a network scope as a principal. The network scope must be in the AVAILABLE state, and the account can't already be a principal of the network scope in any state. To associate a principal again, disassociate it and wait until ListNetworkScopePrincipals no longer returns it. The principal is returned in a transitional state. To track it, call ListNetworkScopePrincipals. An association becomes ASSOCIATED or FAILED. A disassociated principal is removed and is no longer returned.
See also: AWS API Documentation
Request Syntax
client.associate_network_scope_principal(
NetworkScopeId='string',
Principal='string'
)
string
[REQUIRED]
The ID of the network scope to associate the principal with.
string
[REQUIRED]
The 12-digit ID of the AWS account to associate with the network scope.
dict
Response Syntax
{
'NetworkScopeId': 'string',
'Principal': 'string',
'PrincipalRegions': [
'string',
],
'State': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED'|'INACTIVE',
'StateReason': {
'Code': 'ORGANIZATION_ACCESS_LOST'|'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NOT_IN_OWNER_ORGANIZATION'|'ORGANIZATIONAL_UNIT_DELETED'|'NETWORK_MANAGER_SERVICE_LINKED_ROLE_NOT_ASSUMABLE'|'REGION_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'NETWORK_SECURITY_ANALYSIS_POLICY_ATTACHMENT_LIMIT_EXCEEDED',
'Message': 'string'
}
}
Response Structure
(dict) --
NetworkScopeId (string) --
The ID of the network scope.
Principal (string) --
The principal.
PrincipalRegions (list) --
The AWS Regions of the network scope. A principal always has all of the Regions of the network scope. To see whether the account is covered in each Region, call ListNetworkScopePrincipals.
(string) --
State (string) --
The state of the principal, which is ASSOCIATING while the association is being applied.
StateReason (dict) --
The reason for the current state of the principal, if a reason applies.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
Returns information about a network scope.
See also: AWS API Documentation
Request Syntax
client.get_network_scope(
NetworkScopeId='string'
)
string
[REQUIRED]
The ID of the network scope to describe.
dict
Response Syntax
{
'NetworkScope': {
'NetworkScopeId': 'string',
'NetworkScopeArn': 'string',
'Name': 'string',
'AccessMode': 'ACCOUNTS'|'ORGANIZATIONS',
'NetworkScopeRegions': [
'string',
],
'State': 'PENDING'|'AVAILABLE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED',
'StateReason': {
'Code': 'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NETWORK_SECURITY_ANALYSIS_SERVICE_ACCESS_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_TYPE_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'PRINCIPALS_NOT_FULLY_COVERED',
'Message': 'string'
},
'CreatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
NetworkScope (dict) --
Information about the network scope.
NetworkScopeId (string) --
The ID of the network scope.
NetworkScopeArn (string) --
The Amazon Resource Name (ARN) of the network scope.
Name (string) --
The name of the network scope.
AccessMode (string) --
How the network scope admits principals. Each principal must be the ID of an AWS account that has the AWS Network Manager service-linked role. With ACCOUNTS, the account can be any AWS account. With ORGANIZATIONS, the account that owns the network scope must be the management account or a delegated administrator for AWS Network Manager in its organization, and each principal must be an active member account of that organization. A delegated administrator can't add the management account. You choose the access mode when you create the network scope, and you can't change it.
NetworkScopeRegions (list) --
The AWS Regions that the network scope covers.
(string) --
State (string) --
The state of the network scope. The possible values are the following:
PENDING: The network scope is being created.
AVAILABLE: The network scope is ready to use.
UPDATING: A change to the Regions of the network scope is being applied.
DELETING: The network scope is being deleted.
DELETED: The network scope is deleted. GetNetworkScope and ListNetworkScopes return it for 2 hours.
FAILED: A prerequisite that you must complete blocked the creation or the deletion of the network scope. The network scope isn't in use, StateReason describes what to complete, and deleting the network scope is the only way to leave this state. A change that's blocked by a prerequisite that you must complete leaves the network scope AVAILABLE with a StateReason. If a change fails for another reason, the network scope stays UPDATING while the change is retried.
StateReason (dict) --
The reason for the current state of the network scope. A FAILED network scope always has a reason. An AVAILABLE network scope has a reason when there's a prerequisite that you must complete. For an AVAILABLE network scope, the reason clears after you resolve the cause and the network scope is next checked. A FAILED network scope keeps its reason until you delete it.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
CreatedAt (datetime) --
The date and time that the network scope was created.
Starts a dry run of a core network policy version. A dry run calculates the routes that the policy version produces, without applying the policy version to your core network. Use ListCoreNetworkDryRunRoutes to compare these routes to the current routes of your core network.
The dry run is in the PENDING state when it starts, and changes to AVAILABLE when its results are ready. To check the state of a dry run, call GetCoreNetworkPolicy and check the DryRunState of the policy version.
See also: AWS API Documentation
Request Syntax
client.start_core_network_policy_dry_run(
CoreNetworkId='string',
PolicyVersionId=123,
ClientToken='string'
)
string
[REQUIRED]
The ID of the core network.
integer
[REQUIRED]
The ID of the policy version for which to start the dry run.
string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If a dry run is already in the PENDING state for the policy version, the service returns the current DryRunState of that dry run and doesn't start another dry run.
This field is autopopulated if not provided.
dict
Response Syntax
{
'CoreNetworkId': 'string',
'PolicyVersionId': 123,
'DryRunState': 'PENDING'|'AVAILABLE'|'STALE'|'FAILED'
}
Response Structure
(dict) --
CoreNetworkId (string) --
The ID of the core network.
PolicyVersionId (integer) --
The ID of the policy version.
DryRunState (string) --
The state of the dry run.
Creates a network scope for AWS Ops Agent for networking. A network scope defines the AWS accounts and Regions that AWS Ops Agent for networking analyzes.
The network scope starts in the PENDING state and moves to AVAILABLE when it's ready, or to FAILED if a prerequisite is missing. To associate accounts with it, call AssociateNetworkScopePrincipal.
See also: AWS API Documentation
Request Syntax
client.create_network_scope(
Name='string',
AccessMode='ACCOUNTS'|'ORGANIZATIONS',
NetworkScopeRegions=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ClientToken='string'
)
string
[REQUIRED]
The name of the network scope. The name can be up to 128 characters long and can contain letters, numbers, and spaces, as well as the following characters: . _ : / + = @ -
string
[REQUIRED]
How the network scope admits principals. Each principal must be the ID of an AWS account that has the AWS Network Manager service-linked role. With ACCOUNTS, the account can be any AWS account. With ORGANIZATIONS, the account that owns the network scope must be the management account or a delegated administrator for AWS Network Manager in its organization, and each principal must be an active member account of that organization. A delegated administrator can't add the management account. You choose the access mode when you create the network scope, and you can't change it.
list
[REQUIRED]
The AWS Regions that the network scope covers. Each Region must be one where AWS Ops Agent for networking is available and can appear only once.
(string) --
list
The tags to apply to the resource during creation.
(dict) --
Describes a tag.
Key (string) --
The tag key.
Constraints: Maximum length of 128 characters.
Value (string) --
The tag value.
Constraints: Maximum length of 256 characters.
string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry within 8 hours with the same client token and the same parameters, the operation returns the network scope that the first request created. If that network scope no longer exists, the operation returns ConflictException, and you need a new client token. If you reuse a client token with different parameters, the operation returns ValidationException. If you don't specify a client token, the AWS SDK generates one.
This field is autopopulated if not provided.
dict
Response Syntax
{
'NetworkScope': {
'NetworkScopeId': 'string',
'NetworkScopeArn': 'string',
'Name': 'string',
'AccessMode': 'ACCOUNTS'|'ORGANIZATIONS',
'NetworkScopeRegions': [
'string',
],
'State': 'PENDING'|'AVAILABLE'|'UPDATING'|'DELETING'|'DELETED'|'FAILED',
'StateReason': {
'Code': 'SCOPE_OWNER_NOT_ORGANIZATION_MEMBER'|'NETWORK_MANAGER_SERVICE_ACCESS_NOT_ENABLED'|'SCOPE_OWNER_NOT_NETWORK_MANAGER_DELEGATED_ADMINISTRATOR'|'NETWORK_SECURITY_ANALYSIS_SERVICE_ACCESS_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_TYPE_NOT_ENABLED'|'NETWORK_SECURITY_ANALYSIS_POLICY_MANAGEMENT_NOT_DELEGATED'|'PRINCIPALS_NOT_FULLY_COVERED',
'Message': 'string'
},
'CreatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
NetworkScope (dict) --
Information about the network scope.
NetworkScopeId (string) --
The ID of the network scope.
NetworkScopeArn (string) --
The Amazon Resource Name (ARN) of the network scope.
Name (string) --
The name of the network scope.
AccessMode (string) --
How the network scope admits principals. Each principal must be the ID of an AWS account that has the AWS Network Manager service-linked role. With ACCOUNTS, the account can be any AWS account. With ORGANIZATIONS, the account that owns the network scope must be the management account or a delegated administrator for AWS Network Manager in its organization, and each principal must be an active member account of that organization. A delegated administrator can't add the management account. You choose the access mode when you create the network scope, and you can't change it.
NetworkScopeRegions (list) --
The AWS Regions that the network scope covers.
(string) --
State (string) --
The state of the network scope. The possible values are the following:
PENDING: The network scope is being created.
AVAILABLE: The network scope is ready to use.
UPDATING: A change to the Regions of the network scope is being applied.
DELETING: The network scope is being deleted.
DELETED: The network scope is deleted. GetNetworkScope and ListNetworkScopes return it for 2 hours.
FAILED: A prerequisite that you must complete blocked the creation or the deletion of the network scope. The network scope isn't in use, StateReason describes what to complete, and deleting the network scope is the only way to leave this state. A change that's blocked by a prerequisite that you must complete leaves the network scope AVAILABLE with a StateReason. If a change fails for another reason, the network scope stays UPDATING while the change is retried.
StateReason (dict) --
The reason for the current state of the network scope. A FAILED network scope always has a reason. An AVAILABLE network scope has a reason when there's a prerequisite that you must complete. For an AVAILABLE network scope, the reason clears after you resolve the cause and the network scope is next checked. A FAILED network scope keeps its reason until you delete it.
Code (string) --
A stable code that identifies why the resource is in its current state. Branch on this value rather than on Message.
Message (string) --
A human-readable description of the reason, including details such as the action that was denied, the account, or the Region. Don't parse this value to determine state.
CreatedAt (datetime) --
The date and time that the network scope was created.
{'CoreNetworkPolicy': {'DryRunFailureReason': 'string',
'DryRunState': 'PENDING | AVAILABLE | STALE | FAILED',
'DryRunUpdatedAt': 'timestamp'}}
Deletes a policy version from a core network. You can't delete the current LIVE policy.
See also: AWS API Documentation
Request Syntax
client.delete_core_network_policy_version(
CoreNetworkId='string',
PolicyVersionId=123
)
string
[REQUIRED]
The ID of a core network for the deleted policy.
integer
[REQUIRED]
The version ID of the deleted policy.
dict
Response Syntax
{
'CoreNetworkPolicy': {
'CoreNetworkId': 'string',
'PolicyVersionId': 123,
'Alias': 'LIVE'|'LATEST',
'Description': 'string',
'CreatedAt': datetime(2015, 1, 1),
'ChangeSetState': 'PENDING_GENERATION'|'FAILED_GENERATION'|'READY_TO_EXECUTE'|'EXECUTING'|'EXECUTION_SUCCEEDED'|'OUT_OF_DATE',
'PolicyErrors': [
{
'ErrorCode': 'string',
'Message': 'string',
'Path': 'string'
},
],
'PolicyDocument': 'string',
'DryRunState': 'PENDING'|'AVAILABLE'|'STALE'|'FAILED',
'DryRunUpdatedAt': datetime(2015, 1, 1),
'DryRunFailureReason': 'string'
}
}
Response Structure
(dict) --
CoreNetworkPolicy (dict) --
Returns information about the deleted policy version.
CoreNetworkId (string) --
The ID of a core network.
PolicyVersionId (integer) --
The ID of the policy version.
Alias (string) --
Whether a core network policy is the current LIVE policy or the most recently submitted policy.
Description (string) --
The description of a core network policy.
CreatedAt (datetime) --
The timestamp when a core network policy was created.
ChangeSetState (string) --
The state of a core network policy.
PolicyErrors (list) --
Describes any errors in a core network policy.
(dict) --
Provides details about an error in a core network policy.
ErrorCode (string) --
The error code associated with a core network policy error.
Message (string) --
The message associated with a core network policy error code.
Path (string) --
The JSON path where the error was discovered in the policy document.
PolicyDocument (string) --
Describes a core network policy.
DryRunState (string) --
The state of the dry run for the policy version.
Possible values:
PENDING - The dry run is in progress.
AVAILABLE - The dry run results are ready.
STALE - The dry run no longer reflects the current state of the core network. To get current results, start a new dry run.
FAILED - The dry run failed. For the reason, see DryRunFailureReason.
DryRunUpdatedAt (datetime) --
The timestamp when the dry run state of the policy version was last updated.
DryRunFailureReason (string) --
The reason that the dry run failed. The service returns this value only when DryRunState is FAILED.
{'CoreNetworkPolicy': {'DryRunFailureReason': 'string',
'DryRunState': 'PENDING | AVAILABLE | STALE | FAILED',
'DryRunUpdatedAt': 'timestamp'}}
Returns details about a core network policy. You can get details about your current live policy or any previous policy version.
See also: AWS API Documentation
Request Syntax
client.get_core_network_policy(
CoreNetworkId='string',
PolicyVersionId=123,
Alias='LIVE'|'LATEST'
)
string
[REQUIRED]
The ID of a core network.
integer
The ID of a core network policy version.
string
The alias of a core network policy
dict
Response Syntax
{
'CoreNetworkPolicy': {
'CoreNetworkId': 'string',
'PolicyVersionId': 123,
'Alias': 'LIVE'|'LATEST',
'Description': 'string',
'CreatedAt': datetime(2015, 1, 1),
'ChangeSetState': 'PENDING_GENERATION'|'FAILED_GENERATION'|'READY_TO_EXECUTE'|'EXECUTING'|'EXECUTION_SUCCEEDED'|'OUT_OF_DATE',
'PolicyErrors': [
{
'ErrorCode': 'string',
'Message': 'string',
'Path': 'string'
},
],
'PolicyDocument': 'string',
'DryRunState': 'PENDING'|'AVAILABLE'|'STALE'|'FAILED',
'DryRunUpdatedAt': datetime(2015, 1, 1),
'DryRunFailureReason': 'string'
}
}
Response Structure
(dict) --
CoreNetworkPolicy (dict) --
The details about a core network policy.
CoreNetworkId (string) --
The ID of a core network.
PolicyVersionId (integer) --
The ID of the policy version.
Alias (string) --
Whether a core network policy is the current LIVE policy or the most recently submitted policy.
Description (string) --
The description of a core network policy.
CreatedAt (datetime) --
The timestamp when a core network policy was created.
ChangeSetState (string) --
The state of a core network policy.
PolicyErrors (list) --
Describes any errors in a core network policy.
(dict) --
Provides details about an error in a core network policy.
ErrorCode (string) --
The error code associated with a core network policy error.
Message (string) --
The message associated with a core network policy error code.
Path (string) --
The JSON path where the error was discovered in the policy document.
PolicyDocument (string) --
Describes a core network policy.
DryRunState (string) --
The state of the dry run for the policy version.
Possible values:
PENDING - The dry run is in progress.
AVAILABLE - The dry run results are ready.
STALE - The dry run no longer reflects the current state of the core network. To get current results, start a new dry run.
FAILED - The dry run failed. For the reason, see DryRunFailureReason.
DryRunUpdatedAt (datetime) --
The timestamp when the dry run state of the policy version was last updated.
DryRunFailureReason (string) --
The reason that the dry run failed. The service returns this value only when DryRunState is FAILED.
{'States': {'PENDING_DEPLOYMENT'}}
Response {'NetworkRoutes': {'DryRunChangeState': 'ADDED | REMOVED | UPDATED | '
'NO_CHANGES',
'IsOverlappingRoute': 'boolean',
'State': {'PENDING_DEPLOYMENT'}}}
Gets the network routes of the specified global network.
See also: AWS API Documentation
Request Syntax
client.get_network_routes(
GlobalNetworkId='string',
RouteTableIdentifier={
'TransitGatewayRouteTableArn': 'string',
'CoreNetworkSegmentEdge': {
'CoreNetworkId': 'string',
'SegmentName': 'string',
'EdgeLocation': 'string'
},
'CoreNetworkNetworkFunctionGroup': {
'CoreNetworkId': 'string',
'NetworkFunctionGroupName': 'string',
'EdgeLocation': 'string'
}
},
ExactCidrMatches=[
'string',
],
LongestPrefixMatches=[
'string',
],
SubnetOfMatches=[
'string',
],
SupernetOfMatches=[
'string',
],
PrefixListIds=[
'string',
],
States=[
'ACTIVE'|'BLACKHOLE'|'PENDING_DEPLOYMENT',
],
Types=[
'PROPAGATED'|'STATIC'|'SYSTEM',
],
DestinationFilters={
'string': [
'string',
]
},
MaxResults=123,
NextToken='string'
)
string
[REQUIRED]
The ID of the global network.
dict
[REQUIRED]
The ID of the route table.
TransitGatewayRouteTableArn (string) --
The ARN of the transit gateway route table for the attachment request. For example, "TransitGatewayRouteTableArn": "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456".
CoreNetworkSegmentEdge (dict) --
The segment edge in a core network.
CoreNetworkId (string) --
The ID of a core network.
SegmentName (string) --
The name of the segment edge.
EdgeLocation (string) --
The Region where the segment edge is located.
CoreNetworkNetworkFunctionGroup (dict) --
The route table identifier associated with the network function group.
CoreNetworkId (string) --
The ID of the core network.
NetworkFunctionGroupName (string) --
The network function group name.
EdgeLocation (string) --
The location for the core network edge.
list
An exact CIDR block.
(string) --
list
The most specific route that matches the traffic (longest prefix match).
(string) --
list
The routes with a subnet that match the specified CIDR filter.
(string) --
list
The routes with a CIDR that encompasses the CIDR filter. Example: If you specify 10.0.1.0/30, then the result returns 10.0.1.0/29.
(string) --
list
The IDs of the prefix lists.
(string) --
list
The route states.
(string) --
list
The route types.
(string) --
dict
Filter by route table destination. Possible Values: TRANSIT_GATEWAY_ATTACHMENT_ID, RESOURCE_ID, or RESOURCE_TYPE.
(string) --
(list) --
(string) --
integer
The maximum number of results to return.
string
The token for the next page of results.
dict
Response Syntax
{
'RouteTableArn': 'string',
'CoreNetworkSegmentEdge': {
'CoreNetworkId': 'string',
'SegmentName': 'string',
'EdgeLocation': 'string'
},
'CoreNetworkNetworkFunctionGroup': {
'CoreNetworkId': 'string',
'NetworkFunctionGroupName': 'string',
'EdgeLocation': 'string'
},
'RouteTableType': 'TRANSIT_GATEWAY_ROUTE_TABLE'|'CORE_NETWORK_SEGMENT'|'NETWORK_FUNCTION_GROUP',
'RouteTableTimestamp': datetime(2015, 1, 1),
'NetworkRoutes': [
{
'DestinationCidrBlock': 'string',
'Destinations': [
{
'CoreNetworkAttachmentId': 'string',
'TransitGatewayAttachmentId': 'string',
'SegmentName': 'string',
'NetworkFunctionGroupName': 'string',
'EdgeLocation': 'string',
'ResourceType': 'string',
'ResourceId': 'string'
},
],
'PrefixListId': 'string',
'State': 'ACTIVE'|'BLACKHOLE'|'PENDING_DEPLOYMENT',
'Type': 'PROPAGATED'|'STATIC'|'SYSTEM',
'IsOverlappingRoute': True|False,
'DryRunChangeState': 'ADDED'|'REMOVED'|'UPDATED'|'NO_CHANGES'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
RouteTableArn (string) --
The ARN of the route table.
CoreNetworkSegmentEdge (dict) --
Describes a core network segment edge.
CoreNetworkId (string) --
The ID of a core network.
SegmentName (string) --
The name of the segment edge.
EdgeLocation (string) --
The Region where the segment edge is located.
CoreNetworkNetworkFunctionGroup (dict) --
Describes the network function group route table that the routes are from. This field is present only when you specify CoreNetworkNetworkFunctionGroup in RouteTableIdentifier.
CoreNetworkId (string) --
The ID of the core network.
NetworkFunctionGroupName (string) --
The network function group name.
EdgeLocation (string) --
The location for the core network edge.
RouteTableType (string) --
The route table type.
RouteTableTimestamp (datetime) --
The time when Network Manager last collected the routes in the route table.
NetworkRoutes (list) --
The network routes.
(dict) --
Describes a network route.
DestinationCidrBlock (string) --
A unique identifier for the route, such as a CIDR block.
Destinations (list) --
The destinations.
(dict) --
Describes the destination of a network route.
CoreNetworkAttachmentId (string) --
The ID of a core network attachment.
TransitGatewayAttachmentId (string) --
The ID of the transit gateway attachment.
SegmentName (string) --
The name of the segment.
NetworkFunctionGroupName (string) --
The network function group name associated with the destination.
EdgeLocation (string) --
The edge location for the network destination.
ResourceType (string) --
The resource type.
ResourceId (string) --
The ID of the resource.
PrefixListId (string) --
The ID of the prefix list.
State (string) --
The route state. The possible values are ACTIVE, BLACKHOLE, and PENDING_DEPLOYMENT.
PENDING_DEPLOYMENT - The route might not be installed, because routing policies or service insertion act on an overlapping CIDR block. The route is resolved only after the policy version is deployed. Only ListCoreNetworkDryRunRoutes returns this value.
Type (string) --
The route type. The possible values are PROPAGATED, STATIC, and SYSTEM. A SYSTEM route is installed by the core network for the NAT CIDR block of an attachment's NAT rule.
IsOverlappingRoute (boolean) --
Indicates whether the route overlaps with another route, so that the route used to forward traffic can't be determined. Only ListCoreNetworkDryRunRoutes returns this value.
DryRunChangeState (string) --
How the route changes when the policy version is applied, compared to the current routes of the core network. Only ListCoreNetworkDryRunRoutes returns this value.
Possible values:
ADDED - The policy version adds the route.
REMOVED - The policy version removes the route.
UPDATED - The policy version changes the route.
NO_CHANGES - The policy version doesn't change the route.
NextToken (string) --
The token for the next page of results.
{'CoreNetworkPolicy': {'DryRunFailureReason': 'string',
'DryRunState': 'PENDING | AVAILABLE | STALE | FAILED',
'DryRunUpdatedAt': 'timestamp'}}
Creates a new, immutable version of a core network policy. A subsequent change set is created showing the differences between the LIVE policy and the submitted policy.
See also: AWS API Documentation
Request Syntax
client.put_core_network_policy(
CoreNetworkId='string',
PolicyDocument='string',
Description='string',
LatestVersionId=123,
ClientToken='string'
)
string
[REQUIRED]
The ID of a core network.
string
[REQUIRED]
The policy document.
string
a core network policy description.
integer
The ID of a core network policy.
string
The client token associated with the request.
This field is autopopulated if not provided.
dict
Response Syntax
{
'CoreNetworkPolicy': {
'CoreNetworkId': 'string',
'PolicyVersionId': 123,
'Alias': 'LIVE'|'LATEST',
'Description': 'string',
'CreatedAt': datetime(2015, 1, 1),
'ChangeSetState': 'PENDING_GENERATION'|'FAILED_GENERATION'|'READY_TO_EXECUTE'|'EXECUTING'|'EXECUTION_SUCCEEDED'|'OUT_OF_DATE',
'PolicyErrors': [
{
'ErrorCode': 'string',
'Message': 'string',
'Path': 'string'
},
],
'PolicyDocument': 'string',
'DryRunState': 'PENDING'|'AVAILABLE'|'STALE'|'FAILED',
'DryRunUpdatedAt': datetime(2015, 1, 1),
'DryRunFailureReason': 'string'
}
}
Response Structure
(dict) --
CoreNetworkPolicy (dict) --
Describes the changed core network policy.
CoreNetworkId (string) --
The ID of a core network.
PolicyVersionId (integer) --
The ID of the policy version.
Alias (string) --
Whether a core network policy is the current LIVE policy or the most recently submitted policy.
Description (string) --
The description of a core network policy.
CreatedAt (datetime) --
The timestamp when a core network policy was created.
ChangeSetState (string) --
The state of a core network policy.
PolicyErrors (list) --
Describes any errors in a core network policy.
(dict) --
Provides details about an error in a core network policy.
ErrorCode (string) --
The error code associated with a core network policy error.
Message (string) --
The message associated with a core network policy error code.
Path (string) --
The JSON path where the error was discovered in the policy document.
PolicyDocument (string) --
Describes a core network policy.
DryRunState (string) --
The state of the dry run for the policy version.
Possible values:
PENDING - The dry run is in progress.
AVAILABLE - The dry run results are ready.
STALE - The dry run no longer reflects the current state of the core network. To get current results, start a new dry run.
FAILED - The dry run failed. For the reason, see DryRunFailureReason.
DryRunUpdatedAt (datetime) --
The timestamp when the dry run state of the policy version was last updated.
DryRunFailureReason (string) --
The reason that the dry run failed. The service returns this value only when DryRunState is FAILED.
{'CoreNetworkPolicy': {'DryRunFailureReason': 'string',
'DryRunState': 'PENDING | AVAILABLE | STALE | FAILED',
'DryRunUpdatedAt': 'timestamp'}}
Restores a previous policy version as a new, immutable version of a core network policy. A subsequent change set is created showing the differences between the LIVE policy and restored policy.
See also: AWS API Documentation
Request Syntax
client.restore_core_network_policy_version(
CoreNetworkId='string',
PolicyVersionId=123
)
string
[REQUIRED]
The ID of a core network.
integer
[REQUIRED]
The ID of the policy version to restore.
dict
Response Syntax
{
'CoreNetworkPolicy': {
'CoreNetworkId': 'string',
'PolicyVersionId': 123,
'Alias': 'LIVE'|'LATEST',
'Description': 'string',
'CreatedAt': datetime(2015, 1, 1),
'ChangeSetState': 'PENDING_GENERATION'|'FAILED_GENERATION'|'READY_TO_EXECUTE'|'EXECUTING'|'EXECUTION_SUCCEEDED'|'OUT_OF_DATE',
'PolicyErrors': [
{
'ErrorCode': 'string',
'Message': 'string',
'Path': 'string'
},
],
'PolicyDocument': 'string',
'DryRunState': 'PENDING'|'AVAILABLE'|'STALE'|'FAILED',
'DryRunUpdatedAt': datetime(2015, 1, 1),
'DryRunFailureReason': 'string'
}
}
Response Structure
(dict) --
CoreNetworkPolicy (dict) --
Describes the restored core network policy.
CoreNetworkId (string) --
The ID of a core network.
PolicyVersionId (integer) --
The ID of the policy version.
Alias (string) --
Whether a core network policy is the current LIVE policy or the most recently submitted policy.
Description (string) --
The description of a core network policy.
CreatedAt (datetime) --
The timestamp when a core network policy was created.
ChangeSetState (string) --
The state of a core network policy.
PolicyErrors (list) --
Describes any errors in a core network policy.
(dict) --
Provides details about an error in a core network policy.
ErrorCode (string) --
The error code associated with a core network policy error.
Message (string) --
The message associated with a core network policy error code.
Path (string) --
The JSON path where the error was discovered in the policy document.
PolicyDocument (string) --
Describes a core network policy.
DryRunState (string) --
The state of the dry run for the policy version.
Possible values:
PENDING - The dry run is in progress.
AVAILABLE - The dry run results are ready.
STALE - The dry run no longer reflects the current state of the core network. To get current results, start a new dry run.
FAILED - The dry run failed. For the reason, see DryRunFailureReason.
DryRunUpdatedAt (datetime) --
The timestamp when the dry run state of the policy version was last updated.
DryRunFailureReason (string) --
The reason that the dry run failed. The service returns this value only when DryRunState is FAILED.