Skip to content

Commit

Permalink
remove agent alias filter
Browse files Browse the repository at this point in the history
  • Loading branch information
corybekk committed Sep 16, 2024
1 parent 5ea0b67 commit 1e5142c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions resources/bedrock-agentalias.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package resources

import (
"fmt"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/bedrockagent"
Expand Down Expand Up @@ -85,13 +82,6 @@ func ListBedrockAgentIds(svc *bedrockagent.BedrockAgent) ([]string, error) {
return agentIds, nil
}

func (f *BedrockAgentAlias) Filter() error {
if strings.HasPrefix(*f.AgentAliasName, "AgentTestAlias") {
return fmt.Errorf("cannot delete AWS managed Agent Alias")
}
return nil
}

func (f *BedrockAgentAlias) Remove() error {
_, err := f.svc.DeleteAgentAlias(&bedrockagent.DeleteAgentAliasInput{
AgentAliasId: f.AgentAliasId,
Expand Down

0 comments on commit 1e5142c

Please sign in to comment.