Skip to content

Commit

Permalink
resource/alicloud_amqp_instance: Fixed the product code for endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenHanZhang committed Apr 18, 2024
1 parent 9541e19 commit 6c98abf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alicloud/connectivity/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5375,7 +5375,7 @@ func (client *AliyunClient) NewDfsClient() (*rpc.Client, error) {
return conn, nil
}
func (client *AliyunClient) NewAmqpClient() (*rpc.Client, error) {
productCode := "amqp-open"
productCode := "onsproxy"
endpoint := ""
if v, ok := client.config.Endpoints.Load(productCode); !ok || v.(string) == "" {
if err := client.loadEndpoint(productCode); err != nil {
Expand Down
6 changes: 3 additions & 3 deletions alicloud/resource_alicloud_amqp_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func resourceAliCloudAmqpInstanceCreate(d *schema.ResourceData, meta interface{}
var request map[string]interface{}
var response map[string]interface{}
query := make(map[string]interface{})
conn, err := client.NewAmqpClient()
conn, err := client.NewOnsproxyClient()
if err != nil {
return WrapError(err)
}
Expand Down Expand Up @@ -395,7 +395,7 @@ func resourceAliCloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{}
}
update = false
action = "UpdateInstanceName"
conn, err = client.NewAmqpClient()
conn, err = client.NewOnsproxyClient()
if err != nil {
return WrapError(err)
}
Expand Down Expand Up @@ -431,7 +431,7 @@ func resourceAliCloudAmqpInstanceUpdate(d *schema.ResourceData, meta interface{}
}
update = false
action = "UpdateInstance"
conn, err = client.NewAmqpClient()
conn, err = client.NewOnsproxyClient()
if err != nil {
return WrapError(err)
}
Expand Down
2 changes: 1 addition & 1 deletion alicloud/service_alicloud_amqp_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (s *AmqpServiceV2) DescribeAmqpInstance(id string) (object map[string]inter
var response map[string]interface{}
var query map[string]interface{}
action := "GetInstance"
conn, err := client.NewAmqpClient()
conn, err := client.NewOnsproxyClient()
if err != nil {
return object, WrapError(err)
}
Expand Down

0 comments on commit 6c98abf

Please sign in to comment.