Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

create_device

create_device(**kwargs)

Creates a new device in a global network. If you specify both a site ID and a location, the location of the site is used for visualization in the Network Manager console.

See also: AWS API Documentation

Request Syntax

response = client.create_device(
    GlobalNetworkId='string',
    AWSLocation={
        'Zone': 'string',
        'SubnetArn': 'string'
    },
    Description='string',
    Type='string',
    Vendor='string',
    Model='string',
    SerialNumber='string',
    Location={
        'Address': 'string',
        'Latitude': 'string',
        'Longitude': 'string'
    },
    SiteId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • GlobalNetworkId (string) --

    [REQUIRED]

    The ID of the global network.

  • AWSLocation (dict) --

    The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

    • Zone (string) --

      The Zone that the device is located in. Specify the ID of an Availability Zone, Local Zone, Wavelength Zone, or an Outpost.

    • SubnetArn (string) --

      The Amazon Resource Name (ARN) of the subnet that the device is located in.

  • Description (string) --

    A description of the device.

    Constraints: Maximum length of 256 characters.

  • Type (string) -- The type of the device.
  • Vendor (string) --

    The vendor of the device.

    Constraints: Maximum length of 128 characters.

  • Model (string) --

    The model of the device.

    Constraints: Maximum length of 128 characters.

  • SerialNumber (string) --

    The serial number of the device.

    Constraints: Maximum length of 128 characters.

  • Location (dict) --

    The location of the device.

    • Address (string) --

      The physical address.

    • Latitude (string) --

      The latitude.

    • Longitude (string) --

      The longitude.

  • SiteId (string) -- The ID of the site.
  • Tags (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.

Return type

dict

Returns

Response Syntax

{
    'Device': {
        'DeviceId': 'string',
        'DeviceArn': 'string',
        'GlobalNetworkId': 'string',
        'AWSLocation': {
            'Zone': 'string',
            'SubnetArn': 'string'
        },
        'Description': 'string',
        'Type': 'string',
        'Vendor': 'string',
        'Model': 'string',
        'SerialNumber': 'string',
        'Location': {
            'Address': 'string',
            'Latitude': 'string',
            'Longitude': 'string'
        },
        'SiteId': 'string',
        'CreatedAt': datetime(2015, 1, 1),
        'State': 'PENDING'|'AVAILABLE'|'DELETING'|'UPDATING',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Device (dict) --

      Information about the device.

      • DeviceId (string) --

        The ID of the device.

      • DeviceArn (string) --

        The Amazon Resource Name (ARN) of the device.

      • GlobalNetworkId (string) --

        The ID of the global network.

      • AWSLocation (dict) --

        The Amazon Web Services location of the device.

        • Zone (string) --

          The Zone that the device is located in. Specify the ID of an Availability Zone, Local Zone, Wavelength Zone, or an Outpost.

        • SubnetArn (string) --

          The Amazon Resource Name (ARN) of the subnet that the device is located in.

      • Description (string) --

        The description of the device.

      • Type (string) --

        The device type.

      • Vendor (string) --

        The device vendor.

      • Model (string) --

        The device model.

      • SerialNumber (string) --

        The device serial number.

      • Location (dict) --

        The site location.

        • Address (string) --

          The physical address.

        • Latitude (string) --

          The latitude.

        • Longitude (string) --

          The longitude.

      • SiteId (string) --

        The site ID.

      • CreatedAt (datetime) --

        The date and time that the site was created.

      • State (string) --

        The device state.

      • Tags (list) --

        The tags for the device.

        • (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.

Exceptions

  • NetworkManager.Client.exceptions.ValidationException
  • NetworkManager.Client.exceptions.ServiceQuotaExceededException
  • NetworkManager.Client.exceptions.AccessDeniedException
  • NetworkManager.Client.exceptions.ResourceNotFoundException
  • NetworkManager.Client.exceptions.ConflictException
  • NetworkManager.Client.exceptions.ThrottlingException
  • NetworkManager.Client.exceptions.InternalServerException