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

Feature request: Making the API endpoint value of sam list easier to copy #5199

Closed
super132 opened this issue May 25, 2023 · 3 comments
Closed
Labels
type/feature Feature request

Comments

@super132
Copy link
Contributor

Describe your idea/feature/enhancement

As I developer, I'd like to copy the value of the endpoint from sam list command easily. Now with the current table structure, it is difficult to copy it from.

Proposal

To make the URL display in a different format so that it's easier to copy.

Additional Details

@super132 super132 added type/feature Feature request stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels May 25, 2023
@moelasmar
Copy link
Contributor

customer can add --output json to the sam list endpoints command, and this will make copying the output easier.

$ sam list endpoints --output table --stack-name sam-app
Endpoints
-------------------------------------------------------------------------------------------------
Resource ID              Physical ID              Cloud Endpoints          Methods                
-------------------------------------------------------------------------------------------------
ApiGatewayFunction       sam-app-                 -                        -                      
                         ApiGatewayFunction-                                                      
                         IEwjSnV59E51                                                             
HelloFunction            sam-app-HelloFunction-   -                        -                      
                         SXUXPNLKXM7b                                                             
LambdaDemoFunction       sam-app-LambdaDemoFunc   -                        -                      
                         tion-N4xFSQSYxdl8                                                        
MyApiGateWay             exsryzw8d3               https://exsryzw8d3.exe   /lambda['get'];        
                                                  cute-api.us-west-2.ama   /hello['get']          
                                                  zonaws.com/Stage                                
                                                  https://exsryzw8d3.exe                          
                                                  cute-api.us-west-2.ama                          
                                                  zonaws.com/develop                              
ServerlessRestApi        udleyf9bla               https://udleyf9bla.exe   /gateway['get']        
                                                  cute-api.us-west-2.ama                          
                                                  zonaws.com/Prod                                 
                                                  https://udleyf9bla.exe                          
                                                  cute-api.us-west-2.ama                          
                                                  zonaws.com/Stage                                
-------------------------------------------------------------------------------------------------
$ sam list endpoints --output json --stack-name sam-app
[
  {
    "LogicalResourceId": "ApiGatewayFunction",
    "PhysicalResourceId": "sam-app-ApiGatewayFunction-IEwjSnV59E51",
    "CloudEndpoint": "-",
    "Methods": "-"
  },
  {
    "LogicalResourceId": "HelloFunction",
    "PhysicalResourceId": "sam-app-HelloFunction-SXUXPNLKXM7b",
    "CloudEndpoint": "-",
    "Methods": "-"
  },
  {
    "LogicalResourceId": "LambdaDemoFunction",
    "PhysicalResourceId": "sam-app-LambdaDemoFunction-N4xFSQSYxdl8",
    "CloudEndpoint": "-",
    "Methods": "-"
  },
  {
    "LogicalResourceId": "MyApiGateWay",
    "PhysicalResourceId": "exsryzw8d3",
    "CloudEndpoint": [
      "https://exsryzw8d3.execute-api.us-west-2.amazonaws.com/Stage",
      "https://exsryzw8d3.execute-api.us-west-2.amazonaws.com/develop"
    ],
    "Methods": [
      "/lambda['get']",
      "/hello['get']"
    ]
  },
  {
    "LogicalResourceId": "ServerlessRestApi",
    "PhysicalResourceId": "udleyf9bla",
    "CloudEndpoint": [
      "https://udleyf9bla.execute-api.us-west-2.amazonaws.com/Prod",
      "https://udleyf9bla.execute-api.us-west-2.amazonaws.com/Stage"
    ],
    "Methods": [
      "/gateway['get']"
    ]
  }
]

@moelasmar moelasmar removed the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label May 25, 2023
@mndeveci
Copy link
Contributor

mndeveci commented Sep 6, 2023

Resolving due to inactivity, please let us know if you have further questions.

@mndeveci mndeveci closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

No branches or pull requests

3 participants