tencent cloud

Feedback

Naming with Consecutive Numeric Suffixes or Designated Pattern String

Last updated: 2024-01-09 14:47:32

    Overview

    To allow you to name batch created CKafka instances according to a rule during creation, the features of automatically incrementing suffixed numbers and specifying pattern strings are provided.
    Automatically incrementing suffixed numbers: If you purchase multiple CKafka instances, numbers will be suffixed to their names by default, such as ckafka1, ckafka2, ckafka3... For more information, see Automatically incrementing suffixed numbers.
    Specifying the pattern string:
    Specifying one pattern string: This is suitable if you need to create n instances and specify their names with incrementing serial numbers starting from x (such as ckafka3, ckafka4, ckafka5...). For more information, see Specifying one pattern string.
    Specifying multiple pattern strings: This is suitable if you need to create n instances named with multiple prefixes and specified serial numbers for each prefix (such as ckafka3-big10-test, ckafka4-big11-test, ckafka5-big12-test). For more information, see Specifying multiple pattern strings.

    Directions

    Automatically incrementing suffixed numbers

    This feature allows you to name batch purchased instances with the same prefix and automatically incrementing suffixed numbers.
    Note:
    The created instances are suffixed with numbers starting from 1 by default. You cannot specify the starting number.
    The following example assumes that you want to purchase 3 CKafka instances and name them in the format of "ckafka+serial number" (i.e., ckafka1, ckafka2, and ckafka3).
    Operations on the purchase page
    Operations through API
    1. Purchase 3 instances as instructed in Creating Instance. Enter the instance name in the format of prefix+serial number. In this case, enter ckafka as the instance name:
    
    
    
    2. Follow the prompts on the page and make the payment.
    In the ModifyInstanceAttributes API, set the relevant fields:
    Instance name: Set InstanceName to ckafka.

    Specifying the pattern string

    This feature allows you to name batch purchased instances in a complex format with specified serial numbers. You can use one or more pattern strings in instance names as needed. The instance name with a specified pattern string is in the format of {R:x}, where x indicates the starting number in the generated instance names and can be positive integers only.

    Specifying one pattern string

    The following example assumes that you want to create 3 instances and name them with incrementing numbers starting from 3.
    Operations on the purchase page
    Operations through API
    1. Purchase instances as instructed in Creating Instance. Enter the instance name in the format of prefix+specified pattern string {R:x}. In this case, enter ckafka{R:3} as the instance name:
    
    
    
    2. Follow the prompts on the page and make the payment.
    In the ModifyInstanceAttributes API, set the relevant fields:
    Instance name: Set InstanceName to ckafka{R:3}.

    Specifying multiple pattern strings

    The following example assumes that you want to create 3 instances and name them with the prefixes of ckafka, big, and test and serial numbers after ckafka and big incrementing from 13 and 2 respectively (i.e., ckafka13-big2-test, ckafka14-big3-test, and ckafka15-big4-test).
    Operations on the purchase page
    Operations through API
    1. Purchase 3 instances as instructed in Creating Instance. Enter the instance name in the format of "prefix+specified pattern string {R:x}-prefix+specified pattern string {R:x}-prefix". In this case, enter ckafka{R:13}-big{R:2}-test as the instance name:
    
    
    
    2. Follow the prompts on the page and make the payment.
    In the ModifyInstanceAttributes API, set the relevant fields:
    Instance name: Set InstanceName to ckafka{R:13}-big{R:2}-test.

    Feature Verification

    After you batch create instances through automatically incrementing suffixed numbers or specifying the pattern string, you can verify the set instance names as follows:
    Log in to the CKafka console and view the newly created instances. You can see that the batch purchased instances are named according to the rule you set:
    
    
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support