Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there examples of modifying multiple records? #937

Open
ambersariya opened this issue Sep 2, 2021 · 1 comment
Open

Are there examples of modifying multiple records? #937

ambersariya opened this issue Sep 2, 2021 · 1 comment

Comments

@ambersariya
Copy link

ambersariya commented Sep 2, 2021

Below is the sample code i've adapted from this example https://github.com/AnalogJ/lexicon/blob/master/examples/python_library_usage.py

This is the only example I've seen so far and would like to know if it's possible to modify multiple records with the one API call?

Any help would be appreciated, thanks.

config_options = {
    "provider_name": "route53",
    "route53": {        
    },
    "action": "create",
    "domain": "example.org",
    "type": 'TXT',
    "content": "example-content",
    "ttl": 300,
    "name": "_sample.example.org"
}


config = ConfigResolver() \
    .with_env() \
    .with_dict(config_options)

client = Client(config)
results = client.execute()
@adferrand
Copy link
Collaborator

Indeed as of now it is not possible. You will need to create a new Client instance for each record.

It is in my plan to make this possible, but it requires to fix some provider implementations that never plan to call two records modifications with a signle authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants