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

cloudfront create-invalidation --paths #1662

Merged
merged 7 commits into from
Dec 8, 2015

Conversation

rayluo
Copy link
Contributor

@rayluo rayluo commented Dec 1, 2015

Now aws cloudfront create-invalidation has a new parameter --paths.

SYNOPSIS
        create-invalidation
      --distribution-id <value>
      [--invalidation-batch <value>]
      [--paths <value>]

EXAMPLES
   The following command creates an invalidation for a CloudFront  distri-
   bution with the ID S11A16G5KZMEQD:

      aws cloudfront create-invalidation --distribution-id S11A16G5KZMEQD \
        --paths /index.html /error.html

This fixes #920

@rayluo rayluo added investigating This issue is being investigated and/or work is in progress to resolve the issue. pr:needs-review This PR needs a review from a Member. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Dec 1, 2015
class PathsArgument(CustomArgument):

def __init__(self):
help = """The space-separated paths to be invalidated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't shadow a builtin.

@jamesls
Copy link
Member

jamesls commented Dec 2, 2015

Overall looks good. It would be nice if we can somehow document that invalidation-batch and paths are mututally exclusive? Maybe we can just add a note in the help text of --paths?

@rayluo rayluo added incorporating-feedback pr:needs-review This PR needs a review from a Member. and removed pr:needs-review This PR needs a review from a Member. incorporating-feedback labels Dec 2, 2015
@rayluo
Copy link
Contributor Author

rayluo commented Dec 3, 2015

Thanks for the suggestion! "invalidation-batch and paths are mutually exclusive" is now added into the help text of --paths. And all other comments have been incorporated.

class PathsArgument(CustomArgument):

def __init__(self):
doc = """The space-separated paths to be invalidated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would avoid using docstring quotes so something like this:

doc = (
    'The space-separated paths to be invalidated.'
    ' Note: --invalidation-batch and --paths are mututally exclusive.'
)

@kyleknap
Copy link
Contributor

kyleknap commented Dec 3, 2015

Looks good. Had a few small comments.

@kyleknap kyleknap added incorporating-feedback and removed pr:needs-review This PR needs a review from a Member. labels Dec 3, 2015
@rayluo rayluo added pr:needs-review This PR needs a review from a Member. and removed incorporating-feedback labels Dec 3, 2015
@kyleknap
Copy link
Contributor

kyleknap commented Dec 3, 2015

Thanks. Looks good! 🚢

@jamesls
Copy link
Member

jamesls commented Dec 3, 2015

Looks good. :shipit:

@jamesls jamesls added pr:ready-to-merge This PR is ready to be merged. and removed pr:needs-review This PR needs a review from a Member. labels Dec 7, 2015
@rayluo rayluo force-pushed the cloudfront-create-invalidation-paths branch from 5942910 to 4169450 Compare December 8, 2015 02:26
rayluo added a commit that referenced this pull request Dec 8, 2015
…aths

cloudfront create-invalidation --paths

I rebased my CHANGELOG just now.  Now merging.
@rayluo rayluo merged commit fcc0efa into aws:develop Dec 8, 2015
@rayluo rayluo added feature-request A feature should be added or improved. cloudfront labels Dec 8, 2015
@rstormsf
Copy link

rstormsf commented Jan 3, 2016

@rayluo If I run

aws cloudfront create-invalidation --distribution-id XYZ --paths /file.xml
aws: error: argument --invalidation-batch is required

why is invalidation-batch required?

UPDATE:
Never mind. It was old version of awscli from home-brew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. pr:ready-to-merge This PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to invalidate cloudfront assets
4 participants