Documentation ¶
Overview ¶
Copyright 2023 The Radius Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023 The Radius Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func NewCreateOrUpdateAWSCredential(opts armrpc_controller.Options, secretClient secret.Client) (armrpc_controller.Controller, error)
- func NewDeleteAWSCredential(opts armrpc_controller.Options, secretClient secret.Client) (armrpc_controller.Controller, error)
- type CreateOrUpdateAWSCredential
- type DeleteAWSCredential
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateOrUpdateAWSCredential ¶
func NewCreateOrUpdateAWSCredential(opts armrpc_controller.Options, secretClient secret.Client) (armrpc_controller.Controller, error)
NewCreateOrUpdateAWSCredential creates a new CreateOrUpdateAWSCredential controller which is used to create or update AWS credentials in the secret store.
func NewDeleteAWSCredential ¶
func NewDeleteAWSCredential(opts armrpc_controller.Options, secretClient secret.Client) (armrpc_controller.Controller, error)
NewDeleteAWSCredential creates a new DeleteAWSCredential controller which is used to delete AWS credentials from the secret store, and returns it along with any errors that may have occurred.
Types ¶
type CreateOrUpdateAWSCredential ¶
type CreateOrUpdateAWSCredential struct { armrpc_controller.Operation[*datamodel.AWSCredential, datamodel.AWSCredential] // contains filtered or unexported fields }
CreateOrUpdateAWSCredential is the controller implementation to create/update a UCP AWS credential.
func (*CreateOrUpdateAWSCredential) Run ¶
func (c *CreateOrUpdateAWSCredential) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (armrpc_rest.Response, error)
CreateOrUpdateAWSCredential validates the request, saves the AWS credential secret, and saves the resource in the metadata store. If an error occurs, it returns an error response.
type DeleteAWSCredential ¶
type DeleteAWSCredential struct { armrpc_controller.Operation[*datamodel.AWSCredential, datamodel.AWSCredential] // contains filtered or unexported fields }
DeleteAWSCredential is the controller implementation to delete a UCP AWS credential.
func (*DeleteAWSCredential) Run ¶
func (c *DeleteAWSCredential) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (armrpcrest.Response, error)
Run() checks if the AWS Credential exists, deletes the associated secret, and then deletes the AWS Credential from storage. If the AWS Credential does not exist, it returns a No Content response. If an error occurs, it returns an error.