awslabs / aws-powershell-extensions

The extensions for AWS Tools for PowerShell provide workflow enhancements on top of the core AWSPowerShell module.
Apache License 2.0
23 stars 10 forks source link

Value null at 'invalidationBatch.callerReference' for New-CFInvalidation #4

Open frankfuu opened 5 years ago

frankfuu commented 5 years ago

Hi,

I'm trying to create a Cloudfront Invalidation. Here was my command

New-CFInvalidation -DistributionId "E2VZ0IAPPOXXX" -Paths_Item "/*"

but I get an error saying the parameters InvalidationBatch_CallerReference and Paths_Quantity are required but the documentation says otherwise.

New-CFInvalidation : 2 validation errors detected: 
Value null at 'invalidationBatch.callerReference' failed to satisfy constraint: Member must not be null; Value null at 'invalidationBatch.paths.quantity' failed to satisfy constraint: Member must not be null
At line:1 char:1

I've confirmed that for that using Ubuntu's AWS CLI that the two params don't seem neccessary because I tried the following and works fine.

aws cloudfront create-invalidation --distribution-id E2VZ0IAPPOXXX--paths "/*"

Here is my AWS Powershell installation details.

> Get-AWSPowerShellVersion -ListServiceVersionInfo

AWS Tools for Windows PowerShell
Version 3.3.428.0
Copyright 2012-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Amazon Web Services SDK for .NET
Core Runtime Version 3.3.29.16
Copyright 2009-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Service                                               Noun Prefix API Version
-------                                               ----------- -----------
AWS Amplify                                           AMP         2017-07-25
AWS App Mesh                                          AMSH        2018-10-01
AWS AppStream                                         APS         2016-12-01
AWS AppSync                                           ASYN        2017-07-25
AWS Auto Scaling Plans                                ASP         2018-01-06
AWS Batch                                             BAT         2016-08-10
AWS Budgets                                           BGT         2016-10-20
AWS Certificate Manager                               ACM         2015-12-08
AWS Certificate Manager Private Certificate Authority PCA         2017-08-22
AWS Cloud Directory                                   CDIR        2017-01-11
AWS Cloud HSM                                         HSM         2014-05-30
AWS Cloud HSM V2                                      HSM2        2017-04-28
AWS Cloud9                                            C9          2017-09-23
AWS CloudFormation                                    CFN         2010-05-15
AWS CloudTrail                                        CT          2013-11-01
AWS CodeBuild                                         CB          2016-10-06
AWS CodeCommit                                        CC          2015-04-13
AWS CodeDeploy                                        CD          2014-10-06
AWS CodePipeline                                      CP          2015-07-09
AWS CodeStar                                          CST         2017-04-19
AWS Comprehend Medical                                CMPM        2018-10-30
AWS Config                                            CFG         2014-11-12
AWS Cost Explorer                                     CE          2017-10-25
AWS Cost and Usage Report                             CUR         2017-01-06
AWS Data Pipeline                                     DP          2012-10-29
AWS DataSync                                          DSYN        2018-11-09
AWS Database Migration Service                        DMS         2016-01-01
AWS Device Farm                                       DF          2015-06-23
AWS Direct Connect                                    DC          2012-10-25
AWS Directory Service                                 DS          2015-04-16
AWS Elastic Beanstalk                                 EB          2010-12-01
AWS Elemental MediaConnect                            EMCN        2018-11-14
AWS Elemental MediaConvert                            EMC         2017-08-29
AWS Elemental MediaLive                               EML         2017-10-14
AWS Elemental MediaPackage                            EMP         2017-10-12
AWS Elemental MediaStore                              EMS         2017-09-01
AWS Elemental MediaStore Data Plane                   EMSD        2017-09-01
AWS Elemental MediaTailor                             EMT         2018-04-23
AWS Global Accelerator                                GACL        2018-08-08
AWS Glue                                              GLUE        2017-03-31
AWS Greengrass                                        GG          2017-06-07
AWS Health                                            HLTH        2016-08-04
AWS Identity and Access Management                    IAM         2010-05-08
AWS Import/Export                                     IE          2010-06-01
AWS Import/Export Snowball                            SNOW        2016-06-30
AWS IoT                                               IOT         2015-05-28
AWS IoT Jobs Data Plane                               IOTJ        2017-09-29
AWS Key Management Service                            KMS         2014-11-01
AWS Lambda                                            LM          2015-03-31
AWS License Manager                                   LICM        2018-08-01
AWS Marketplace Commerce Analytics                    MCA         2015-07-01
AWS Marketplace Entitlement Service                   MES         2017-01-11
AWS Marketplace Metering                              MM          2016-01-14
AWS Migration Hub                                     MH          2017-05-31
AWS Mobile                                            MOBL        2017-07-01
AWS OpsWorks                                          OPS         2013-02-18
AWS OpsWorksCM                                        OWCM        2016-11-01
AWS Organizations                                     ORG         2016-11-28
AWS Performance Insights                              PI          2018-02-27
AWS Price List Service                                PLS         2017-10-15
AWS RDS DataService                                   RDSD        2018-08-01
AWS Resource Access Manager                           RAM         2018-01-04
AWS Resource Groups                                   RG          2017-11-27
AWS Resource Groups Tagging API                       RGT         2017-01-26
AWS RoboMaker                                         ROBO        2018-06-29
AWS Secrets Manager                                   SEC         2017-10-17
AWS Security Hub                                      SHUB        2018-10-26
AWS Security Token Service                            STS         2011-06-15
AWS Serverless Application Repository                 SAR         2017-09-08
AWS Service Catalog                                   SC          2015-12-10
AWS Shield                                            SHLD        2016-06-02
AWS Step Functions                                    SFN         2016-11-23
AWS Storage Gateway                                   SG          2013-06-30
AWS Support API                                       ASA         2013-04-15
AWS Systems Manager                                   SSM         2014-11-06
AWS Transfer for SFTP                                 TFR         2018-11-05
AWS WAF                                               WAF         2015-08-24
AWS WAF Regional                                      WAFR        2016-11-28
AWS X-Ray                                             XR          2016-04-12
Alexa For Business                                    ALXB        2017-11-09
Amazon API Gateway                                    AG          2015-07-09
Amazon Athena                                         ATH         2017-05-18
Amazon Chime                                          CHM         2018-05-01
Amazon CloudFront                                     CF          2018-11-05
Amazon CloudSearch                                    CS          2013-01-01
Amazon CloudSearchDomain                              CSD         2013-01-01
.....
...

Any ideas?

camharris commented 5 years ago

I can confirm this issue, maybe the documentation should be updated.