diff --git a/cmd/scw/testdata/test-all-usage-iam-organization-enable-saml-usage.golden b/cmd/scw/testdata/test-all-usage-iam-organization-enable-saml-usage.golden new file mode 100644 index 0000000000..46da756c7a --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-organization-enable-saml-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Enable SAML Identity Provider for an Organization. + +USAGE: + scw iam organization enable-saml [arg=value ...] + +ARGS: + [organization-id] Organization ID to use. If none is passed the default organization ID will be used + +FLAGS: + -h, --help help for enable-saml + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-iam-organization-get-saml-usage.golden b/cmd/scw/testdata/test-all-usage-iam-organization-get-saml-usage.golden new file mode 100644 index 0000000000..5a60463a0a --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-organization-get-saml-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get SAML Identity Provider configuration of an Organization. + +USAGE: + scw iam organization get-saml [arg=value ...] + +ARGS: + [organization-id] Organization ID to use. If none is passed the default organization ID will be used + +FLAGS: + -h, --help help for get-saml + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-iam-organization-usage.golden b/cmd/scw/testdata/test-all-usage-iam-organization-usage.golden index bf76c3f269..8291917e8c 100644 --- a/cmd/scw/testdata/test-all-usage-iam-organization-usage.golden +++ b/cmd/scw/testdata/test-all-usage-iam-organization-usage.golden @@ -3,7 +3,11 @@ Organization-wide management commands. USAGE: - scw iam organization + scw iam organization + +AVAILABLE COMMANDS: + enable-saml Enable SAML Identity Provider for an Organization + get-saml Get SAML Identity Provider configuration of an Organization FLAGS: -h, --help help for organization @@ -13,3 +17,5 @@ GLOBAL FLAGS: -D, --debug Enable debug mode -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") -p, --profile string The config profile to use + +Use "scw iam organization [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-saml-certificates-add-usage.golden b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-add-usage.golden new file mode 100644 index 0000000000..69aa34dee9 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-add-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Add a SAML certificate. + +USAGE: + scw iam saml-certificates add [arg=value ...] + +ARGS: + saml-id ID of the SAML configuration + type Type of the SAML certificate (unknown_certificate_type | signing | encryption) + content Content of the SAML certificate + +FLAGS: + -h, --help help for add + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-iam-saml-certificates-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-delete-usage.golden new file mode 100644 index 0000000000..754bc1cc69 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-delete-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete a SAML certificate. + +USAGE: + scw iam saml-certificates delete [arg=value ...] + +ARGS: + certificate-id ID of the certificate to delete + +FLAGS: + -h, --help help for delete + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-iam-saml-certificates-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-list-usage.golden new file mode 100644 index 0000000000..6b1d8f27a5 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-list-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List SAML certificates. + +USAGE: + scw iam saml-certificates list [arg=value ...] + +ARGS: + saml-id ID of the SAML configuration + +FLAGS: + -h, --help help for list + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-iam-saml-certificates-usage.golden b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-usage.golden new file mode 100644 index 0000000000..d329f1a9c8 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-saml-certificates-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +SAML Certificates management commands. + +USAGE: + scw iam saml-certificates + +AVAILABLE COMMANDS: + add Add a SAML certificate + delete Delete a SAML certificate + list List SAML certificates + +FLAGS: + -h, --help help for saml-certificates + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw iam saml-certificates [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-saml-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-saml-delete-usage.golden new file mode 100644 index 0000000000..0af93420b4 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-saml-delete-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Disable SAML Identity Provider for an Organization. + +USAGE: + scw iam saml delete [arg=value ...] + +ARGS: + saml-id ID of the SAML configuration + +FLAGS: + -h, --help help for delete + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-iam-saml-update-usage.golden b/cmd/scw/testdata/test-all-usage-iam-saml-update-usage.golden new file mode 100644 index 0000000000..60ad6be1f4 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-saml-update-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update SAML Identity Provider configuration. + +USAGE: + scw iam saml update [arg=value ...] + +ARGS: + saml-id ID of the SAML configuration + [entity-id] Entity ID of the SAML Identity Provider + [single-sign-on-url] Single Sign-On URL of the SAML Identity Provider + +FLAGS: + -h, --help help for update + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-all-usage-iam-saml-usage.golden b/cmd/scw/testdata/test-all-usage-iam-saml-usage.golden new file mode 100644 index 0000000000..94a8c258c9 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-saml-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +SAML management commands. + +USAGE: + scw iam saml + +AVAILABLE COMMANDS: + delete Disable SAML Identity Provider for an Organization + update Update SAML Identity Provider configuration + +FLAGS: + -h, --help help for saml + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw iam saml [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-usage.golden b/cmd/scw/testdata/test-all-usage-iam-usage.golden index 88ad0e7944..e1121d6c8e 100644 --- a/cmd/scw/testdata/test-all-usage-iam-usage.golden +++ b/cmd/scw/testdata/test-all-usage-iam-usage.golden @@ -6,17 +6,19 @@ USAGE: scw iam AVAILABLE COMMANDS: - api-key API keys management commands - application Applications management commands - group Groups management commands - jwt JWTs management commands - log Log management commands - organization Organization-wide management commands - permission-set Permission sets management commands - policy Policies management commands - rule Rules management commands - ssh-key SSH keys management commands - user Users management commands + api-key API keys management commands + application Applications management commands + group Groups management commands + jwt JWTs management commands + log Log management commands + organization Organization-wide management commands + permission-set Permission sets management commands + policy Policies management commands + rule Rules management commands + saml SAML management commands + saml-certificates SAML Certificates management commands + ssh-key SSH keys management commands + user Users management commands FLAGS: -h, --help help for iam diff --git a/cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden index 5872bff7a5..4d4056cc82 100644 --- a/cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden @@ -10,7 +10,7 @@ ARGS: [user-ids.{index}] Filter by list of IDs [mfa] Filter by MFA status [tag] Filter by tags containing a given string - [type] Filter by user type (unknown_type | guest | owner | member) + [type] Filter by user type (unknown_type | owner | member) organization-id= ID of the Organization to filter FLAGS: diff --git a/docs/commands/iam.md b/docs/commands/iam.md index 7475009906..da63fdcae8 100644 --- a/docs/commands/iam.md +++ b/docs/commands/iam.md @@ -32,6 +32,8 @@ This API allows you to manage Identity and Access Management (IAM) across your S - [Get a log](#get-a-log) - [List logs](#list-logs) - [Organization-wide management commands](#organization-wide-management-commands) + - [Enable SAML Identity Provider for an Organization](#enable-saml-identity-provider-for-an-organization) + - [Get SAML Identity Provider configuration of an Organization](#get-saml-identity-provider-configuration-of-an-organization) - [Permission sets management commands](#permission-sets-management-commands) - [List permission sets](#list-permission-sets) - [Policies management commands](#policies-management-commands) @@ -46,6 +48,13 @@ This API allows you to manage Identity and Access Management (IAM) across your S - [Delete a rule for a specific IAM policy](#delete-a-rule-for-a-specific-iam-policy) - [List rules of a given policy](#list-rules-of-a-given-policy) - [Set rules of a given policy](#set-rules-of-a-given-policy) +- [SAML management commands](#saml-management-commands) + - [Disable SAML Identity Provider for an Organization](#disable-saml-identity-provider-for-an-organization) + - [Update SAML Identity Provider configuration](#update-saml-identity-provider-configuration) +- [SAML Certificates management commands](#saml-certificates-management-commands) + - [Add a SAML certificate](#add-a-saml-certificate) + - [Delete a SAML certificate](#delete-a-saml-certificate) + - [List SAML certificates](#list-saml-certificates) - [SSH keys management commands](#ssh-keys-management-commands) - [Create an SSH key](#create-an-ssh-key) - [Delete an SSH key](#delete-an-ssh-key) @@ -634,15 +643,44 @@ scw iam log list [arg=value ...] Organization-wide management commands. -Organization-wide management commands. + +### Enable SAML Identity Provider for an Organization + +Enable SAML Identity Provider for an Organization. **Usage:** ``` -scw iam organization +scw iam organization enable-saml [arg=value ...] ``` +**Args:** + +| Name | | Description | +|------|---|-------------| +| organization-id | | Organization ID to use. If none is passed the default organization ID will be used | + + + +### Get SAML Identity Provider configuration of an Organization + +Get SAML Identity Provider configuration of an Organization. + +**Usage:** + +``` +scw iam organization get-saml [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| organization-id | | Organization ID to use. If none is passed the default organization ID will be used | + + ## Permission sets management commands @@ -914,6 +952,115 @@ scw iam rule update [arg=value ...] +## SAML management commands + +SAML management commands. + + +### Disable SAML Identity Provider for an Organization + +Disable SAML Identity Provider for an Organization. + +**Usage:** + +``` +scw iam saml delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| saml-id | Required | ID of the SAML configuration | + + + +### Update SAML Identity Provider configuration + +Update SAML Identity Provider configuration. + +**Usage:** + +``` +scw iam saml update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| saml-id | Required | ID of the SAML configuration | +| entity-id | | Entity ID of the SAML Identity Provider | +| single-sign-on-url | | Single Sign-On URL of the SAML Identity Provider | + + + +## SAML Certificates management commands + +SAML Certificates management commands. + + +### Add a SAML certificate + +Add a SAML certificate. + +**Usage:** + +``` +scw iam saml-certificates add [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| saml-id | Required | ID of the SAML configuration | +| type | Required
One of: `unknown_certificate_type`, `signing`, `encryption` | Type of the SAML certificate | +| content | Required | Content of the SAML certificate | + + + +### Delete a SAML certificate + +Delete a SAML certificate. + +**Usage:** + +``` +scw iam saml-certificates delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| certificate-id | Required | ID of the certificate to delete | + + + +### List SAML certificates + +List SAML certificates. + +**Usage:** + +``` +scw iam saml-certificates list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| saml-id | Required | ID of the SAML configuration | + + + ## SSH keys management commands SSH keys management commands. @@ -1146,7 +1293,7 @@ scw iam user list [arg=value ...] | user-ids.{index} | | Filter by list of IDs | | mfa | | Filter by MFA status | | tag | | Filter by tags containing a given string | -| type | One of: `unknown_type`, `guest`, `owner`, `member` | Filter by user type | +| type | One of: `unknown_type`, `owner`, `member` | Filter by user type | | organization-id | Required
Default: `` | ID of the Organization to filter | diff --git a/internal/namespaces/iam/v1alpha1/iam_cli.go b/internal/namespaces/iam/v1alpha1/iam_cli.go index 04abae5033..d5e176a214 100644 --- a/internal/namespaces/iam/v1alpha1/iam_cli.go +++ b/internal/namespaces/iam/v1alpha1/iam_cli.go @@ -31,6 +31,8 @@ func GetGeneratedCommands() *core.Commands { iamJwt(), iamLog(), iamOrganization(), + iamSaml(), + iamSamlCertificates(), iamSSHKeyList(), iamSSHKeyCreate(), iamSSHKeyGet(), @@ -76,6 +78,13 @@ func GetGeneratedCommands() *core.Commands { iamJwtDelete(), iamLogList(), iamLogGet(), + iamOrganizationGetSaml(), + iamOrganizationEnableSaml(), + iamSamlUpdate(), + iamSamlDelete(), + iamSamlCertificatesList(), + iamSamlCertificatesAdd(), + iamSamlCertificatesDelete(), ) } @@ -186,6 +195,24 @@ func iamOrganization() *core.Command { } } +func iamSaml() *core.Command { + return &core.Command{ + Short: `SAML management commands`, + Long: `SAML management commands.`, + Namespace: "iam", + Resource: "saml", + } +} + +func iamSamlCertificates() *core.Command { + return &core.Command{ + Short: `SAML Certificates management commands`, + Long: `SAML Certificates management commands.`, + Namespace: "iam", + Resource: "saml-certificates", + } +} + func iamSSHKeyList() *core.Command { return &core.Command{ Short: `List SSH keys`, @@ -512,7 +539,6 @@ func iamUserList() *core.Command { Positional: false, EnumValues: []string{ "unknown_type", - "guest", "owner", "member", }, @@ -2636,3 +2662,241 @@ func iamLogGet() *core.Command { }, } } + +func iamOrganizationGetSaml() *core.Command { + return &core.Command{ + Short: `Get SAML Identity Provider configuration of an Organization`, + Long: `Get SAML Identity Provider configuration of an Organization.`, + Namespace: "iam", + Resource: "organization", + Verb: "get-saml", + // Deprecated: false, + ArgsType: reflect.TypeOf(iam.GetOrganizationSamlRequest{}), + ArgSpecs: core.ArgSpecs{ + core.OrganizationIDArgSpec(), + }, + Run: func(ctx context.Context, args any) (i any, e error) { + request := args.(*iam.GetOrganizationSamlRequest) + + client := core.ExtractClient(ctx) + api := iam.NewAPI(client) + + return api.GetOrganizationSaml(request) + }, + } +} + +func iamOrganizationEnableSaml() *core.Command { + return &core.Command{ + Short: `Enable SAML Identity Provider for an Organization`, + Long: `Enable SAML Identity Provider for an Organization.`, + Namespace: "iam", + Resource: "organization", + Verb: "enable-saml", + // Deprecated: false, + ArgsType: reflect.TypeOf(iam.EnableOrganizationSamlRequest{}), + ArgSpecs: core.ArgSpecs{ + core.OrganizationIDArgSpec(), + }, + Run: func(ctx context.Context, args any) (i any, e error) { + request := args.(*iam.EnableOrganizationSamlRequest) + + client := core.ExtractClient(ctx) + api := iam.NewAPI(client) + + return api.EnableOrganizationSaml(request) + }, + } +} + +func iamSamlUpdate() *core.Command { + return &core.Command{ + Short: `Update SAML Identity Provider configuration`, + Long: `Update SAML Identity Provider configuration.`, + Namespace: "iam", + Resource: "saml", + Verb: "update", + // Deprecated: false, + ArgsType: reflect.TypeOf(iam.UpdateSamlRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "saml-id", + Short: `ID of the SAML configuration`, + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "entity-id", + Short: `Entity ID of the SAML Identity Provider`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "single-sign-on-url", + Short: `Single Sign-On URL of the SAML Identity Provider`, + Required: false, + Deprecated: false, + Positional: false, + }, + }, + Run: func(ctx context.Context, args any) (i any, e error) { + request := args.(*iam.UpdateSamlRequest) + + client := core.ExtractClient(ctx) + api := iam.NewAPI(client) + + return api.UpdateSaml(request) + }, + } +} + +func iamSamlDelete() *core.Command { + return &core.Command{ + Short: `Disable SAML Identity Provider for an Organization`, + Long: `Disable SAML Identity Provider for an Organization.`, + Namespace: "iam", + Resource: "saml", + Verb: "delete", + // Deprecated: false, + ArgsType: reflect.TypeOf(iam.DeleteSamlRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "saml-id", + Short: `ID of the SAML configuration`, + Required: true, + Deprecated: false, + Positional: true, + }, + }, + Run: func(ctx context.Context, args any) (i any, e error) { + request := args.(*iam.DeleteSamlRequest) + + client := core.ExtractClient(ctx) + api := iam.NewAPI(client) + e = api.DeleteSaml(request) + if e != nil { + return nil, e + } + + return &core.SuccessResult{ + Resource: "saml", + Verb: "delete", + }, nil + }, + } +} + +func iamSamlCertificatesList() *core.Command { + return &core.Command{ + Short: `List SAML certificates`, + Long: `List SAML certificates.`, + Namespace: "iam", + Resource: "saml-certificates", + Verb: "list", + // Deprecated: false, + ArgsType: reflect.TypeOf(iam.ListSamlCertificatesRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "saml-id", + Short: `ID of the SAML configuration`, + Required: true, + Deprecated: false, + Positional: true, + }, + }, + Run: func(ctx context.Context, args any) (i any, e error) { + request := args.(*iam.ListSamlCertificatesRequest) + + client := core.ExtractClient(ctx) + api := iam.NewAPI(client) + + return api.ListSamlCertificates(request) + }, + } +} + +func iamSamlCertificatesAdd() *core.Command { + return &core.Command{ + Short: `Add a SAML certificate`, + Long: `Add a SAML certificate.`, + Namespace: "iam", + Resource: "saml-certificates", + Verb: "add", + // Deprecated: false, + ArgsType: reflect.TypeOf(iam.AddSamlCertificateRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "saml-id", + Short: `ID of the SAML configuration`, + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "type", + Short: `Type of the SAML certificate`, + Required: true, + Deprecated: false, + Positional: false, + EnumValues: []string{ + "unknown_certificate_type", + "signing", + "encryption", + }, + }, + { + Name: "content", + Short: `Content of the SAML certificate`, + Required: true, + Deprecated: false, + Positional: false, + }, + }, + Run: func(ctx context.Context, args any) (i any, e error) { + request := args.(*iam.AddSamlCertificateRequest) + + client := core.ExtractClient(ctx) + api := iam.NewAPI(client) + + return api.AddSamlCertificate(request) + }, + } +} + +func iamSamlCertificatesDelete() *core.Command { + return &core.Command{ + Short: `Delete a SAML certificate`, + Long: `Delete a SAML certificate.`, + Namespace: "iam", + Resource: "saml-certificates", + Verb: "delete", + // Deprecated: false, + ArgsType: reflect.TypeOf(iam.DeleteSamlCertificateRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "certificate-id", + Short: `ID of the certificate to delete`, + Required: true, + Deprecated: false, + Positional: true, + }, + }, + Run: func(ctx context.Context, args any) (i any, e error) { + request := args.(*iam.DeleteSamlCertificateRequest) + + client := core.ExtractClient(ctx) + api := iam.NewAPI(client) + e = api.DeleteSamlCertificate(request) + if e != nil { + return nil, e + } + + return &core.SuccessResult{ + Resource: "saml-certificates", + Verb: "delete", + }, nil + }, + } +}