EC2 / Client / associate_ipam_resource_discovery

associate_ipam_resource_discovery#

EC2.Client.associate_ipam_resource_discovery(**kwargs)#

Associates an IPAM resource discovery with an Amazon VPC IPAM. A resource discovery is an IPAM component that enables IPAM to manage and monitor resources that belong to the owning account.

See also: AWS API Documentation

Request Syntax

response = client.associate_ipam_resource_discovery(
    DryRun=True|False,
    IpamId='string',
    IpamResourceDiscoveryId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'ipam-resource-discovery'|'ipam-resource-discovery-association',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters:
  • DryRun (boolean) – A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • IpamId (string) –

    [REQUIRED]

    An IPAM ID.

  • IpamResourceDiscoveryId (string) –

    [REQUIRED]

    A resource discovery ID.

  • TagSpecifications (list) –

    Tag specifications.

    • (dict) –

      The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you’re using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you’re using, you’ll get an error.

      • ResourceType (string) –

        The type of resource to tag on creation.

      • Tags (list) –

        The tags to apply to the resource.

        • (dict) –

          Describes a tag.

          • Key (string) –

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

          • Value (string) –

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

  • ClientToken (string) –

    A client token.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'IpamResourceDiscoveryAssociation': {
        'OwnerId': 'string',
        'IpamResourceDiscoveryAssociationId': 'string',
        'IpamResourceDiscoveryAssociationArn': 'string',
        'IpamResourceDiscoveryId': 'string',
        'IpamId': 'string',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'IsDefault': True|False,
        'ResourceDiscoveryStatus': 'active'|'not-found',
        'State': 'associate-in-progress'|'associate-complete'|'associate-failed'|'disassociate-in-progress'|'disassociate-complete'|'disassociate-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • IpamResourceDiscoveryAssociation (dict) –

      A resource discovery association. An associated resource discovery is a resource discovery that has been associated with an IPAM.

      • OwnerId (string) –

        The Amazon Web Services account ID of the resource discovery owner.

      • IpamResourceDiscoveryAssociationId (string) –

        The resource discovery association ID.

      • IpamResourceDiscoveryAssociationArn (string) –

        The resource discovery association Amazon Resource Name (ARN).

      • IpamResourceDiscoveryId (string) –

        The resource discovery ID.

      • IpamId (string) –

        The IPAM ID.

      • IpamArn (string) –

        The IPAM ARN.

      • IpamRegion (string) –

        The IPAM home Region.

      • IsDefault (boolean) –

        Defines if the resource discovery is the default. When you create an IPAM, a default resource discovery is created for your IPAM and it’s associated with your IPAM.

      • ResourceDiscoveryStatus (string) –

        The resource discovery status.

        • active - Connection or permissions required to read the results of the resource discovery are intact.

        • not-found - Connection or permissions required to read the results of the resource discovery are broken. This may happen if the owner of the resource discovery stopped sharing it or deleted the resource discovery. Verify the resource discovery still exists and the Amazon Web Services RAM resource share is still intact.

      • State (string) –

        The lifecycle state of the association when you associate or disassociate a resource discovery.

        • associate-in-progress - Resource discovery is being associated.

        • associate-complete - Resource discovery association is complete.

        • associate-failed - Resource discovery association has failed.

        • disassociate-in-progress - Resource discovery is being disassociated.

        • disassociate-complete - Resource discovery disassociation is complete.

        • ``disassociate-failed ``- Resource discovery disassociation has failed.

        • isolate-in-progress - Amazon Web Services account that created the resource discovery association has been removed and the resource discovery associatation is being isolated.

        • isolate-complete - Resource discovery isolation is complete..

        • restore-in-progress - Resource discovery is being restored.

      • Tags (list) –

        A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs.

        • (dict) –

          Describes a tag.

          • Key (string) –

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

          • Value (string) –

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.