0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Get-RDSDBInstanceコマンドレットでFilterを使う

Posted at

やりたいこと

PowerShellでRDSを検索して一覧を取得したい。
ググったけどやり方見つからなかったので記事にしてみる。

公式ドキュメントはここらへん。
https://docs.aws.amazon.com/powershell/latest/reference/items/Get-RDSDBInstance.html
https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/RDS/TFilter.html

やりかた

こんな感じでできました。

$filter = New-Object Amazon.RDS.Model.Filter
$filter.Name = "engine"
$filter.Values = @("sqlserver-ee", "sqlserver-se")

Get-RDSDBInstance -Filter $filter 

補足

公式ドキュメントのParametersセクションの-Filterのところに記載のある項目しか検索できないようです。
https://docs.aws.amazon.com/powershell/latest/reference/items/Get-RDSDBInstance.html#parameters

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?