{
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2/tree/master/aws-ec2-eipassociation",
  "tagging" : {
    "taggable" : false
  },
  "deprecatedProperties" : [ "/properties/EIP" ],
  "handlers" : {
    "read" : {
      "permissions" : [ "ec2:DescribeAddresses" ]
    },
    "create" : {
      "permissions" : [ "ec2:DescribeAddresses", "ec2:AssociateAddress" ]
    },
    "list" : {
      "permissions" : [ "ec2:DescribeAddresses" ]
    },
    "delete" : {
      "permissions" : [ "ec2:DisassociateAddress", "ec2:DescribeAddresses" ]
    }
  },
  "typeName" : "AWS::EC2::EIPAssociation",
  "readOnlyProperties" : [ "/properties/Id" ],
  "description" : "Associates an Elastic IP address with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account. For more information about working with Elastic IP addresses, see [Elastic IP address concepts and rules](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#vpc-eip-overview).\n You must specify ``AllocationId`` and either ``InstanceId``, ``NetworkInterfaceId``, or ``PrivateIpAddress``.",
  "createOnlyProperties" : [ "/properties/AllocationId", "/properties/NetworkInterfaceId", "/properties/InstanceId", "/properties/PrivateIpAddress", "/properties/EIP" ],
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/Id" ],
  "properties" : {
    "PrivateIpAddress" : {
      "description" : "The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.",
      "type" : "string"
    },
    "InstanceId" : {
      "description" : "The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.",
      "type" : "string"
    },
    "AllocationId" : {
      "description" : "The allocation ID. This is required.",
      "type" : "string"
    },
    "Id" : {
      "description" : "",
      "type" : "string"
    },
    "NetworkInterfaceId" : {
      "description" : "The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.\n You can specify either the instance ID or the network interface ID, but not both.",
      "type" : "string"
    },
    "EIP" : {
      "description" : "",
      "anyOf" : [ {
        "relationshipRef" : {
          "typeName" : "AWS::EC2::EIP",
          "propertyPath" : "/properties/PublicIp"
        }
      }, {
        "relationshipRef" : {
          "typeName" : "AWS::EC2::EIP",
          "propertyPath" : "/properties/AllocationId"
        }
      } ],
      "type" : "string"
    }
  },
  "replacementStrategy" : "delete_then_create"
}