Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CreateKey (0.06 sec)

  1. internal/kms/kms.go

    		DefaultKeyID: k.DefaultKey,
    		Endpoints:    endpoints,
    	}, nil
    }
    
    // CreateKey creates the master key req.Name. It returns
    // ErrKeyExists if the key already exists.
    func (k *KMS) CreateKey(ctx context.Context, req *CreateKeyRequest) error {
    	start := time.Now()
    	err := k.conn.CreateKey(ctx, req)
    	k.updateMetrics(err, time.Since(start))
    
    	return err
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  2. cmd/kms-handlers.go

    		return
    	}
    	if !checkKMSActionAllowed(r, owner, cred, policy.KMSCreateKeyAction, keyID) {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAccessDenied), r.URL)
    		return
    	}
    
    	if err := GlobalKMS.CreateKey(ctx, &kms.CreateKeyRequest{Name: keyID}); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    	writeSuccessResponseHeadersOnly(w)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. cmd/common-main.go

    	})
    	if err != nil {
    		logger.Fatal(err, "Failed to connect to KMS")
    	}
    
    	if _, err = KMS.GenerateKey(GlobalContext, &kms.GenerateKeyRequest{}); errors.Is(err, kms.ErrKeyNotFound) {
    		err = KMS.CreateKey(GlobalContext, &kms.CreateKeyRequest{Name: KMS.DefaultKey})
    	}
    	if err != nil && !errors.Is(err, kms.ErrKeyExists) && !errors.Is(err, kms.ErrPermission) {
    		logger.Fatal(err, "Failed to connect to KMS")
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 21:50:11 UTC 2024
    - 31.7K bytes
    - Viewed (0)
Back to top