選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

從憑證移除標籤

焦點模式
從憑證移除標籤 - AWS Certificate Manager

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

下面的例子演示了如何使用該RemoveTagsFromCertificate函數。

package com.amazonaws.samples; import com.amazonaws.services.certificatemanager.AWSCertificateManagerClientBuilder; import com.amazonaws.services.certificatemanager.AWSCertificateManager; import com.amazonaws.services.certificatemanager.model.RemoveTagsFromCertificateRequest; import com.amazonaws.services.certificatemanager.model.RemoveTagsFromCertificateResult; import com.amazonaws.services.certificatemanager.model.Tag; import com.amazonaws.services.certificatemanager.model.InvalidArnException; import com.amazonaws.services.certificatemanager.model.InvalidTagException; import com.amazonaws.services.certificatemanager.model.ResourceNotFoundException; import com.amazonaws.AmazonClientException; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.regions.Regions; import java.util.ArrayList; /** * This sample demonstrates how to use the RemoveTagsFromCertificate function in the AWS Certificate * Manager service. * * Input parameters: * CertificateArn - The ARN of the certificate from which you want to remove one or more tags. * Tags - A collection of key-value pairs that specify which tags to remove. * */ public class AWSCertificateManagerExample { public static void main(String[] args) throws Exception { // Retrieve your credentials from the C:\Users\name\.aws\credentials file in Windows // or the ~/.aws/credentials file in Linux. AWSCredentials credentials = null; try { credentials = new ProfileCredentialsProvider().getCredentials(); } catch (Exception ex) { throw new AmazonClientException("Cannot load your credentials from file.", ex); } // Create a client. AWSCertificateManager client = AWSCertificateManagerClientBuilder.standard() .withRegion(Regions.US_EAST_1) .withCredentials(new AWSStaticCredentialsProvider(credentials)) .build(); // Specify the tags to remove. Tag tag1 = new Tag(); tag1.setKey("Short_Name"); tag1.setValue("My_Cert"); Tag tag2 = new Tag() .withKey("Purpose") .withValue("Test"); // Add the tags to a collection. ArrayList<Tag> tags = new ArrayList<Tag>(); tags.add(tag1); tags.add(tag2); // Create a request object. RemoveTagsFromCertificateRequest req = new RemoveTagsFromCertificateRequest(); req.setCertificateArn("arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012"); req.setTags(tags); // Create a result object. RemoveTagsFromCertificateResult result = null; try { result = client.removeTagsFromCertificate(req); } catch(InvalidArnException ex) { throw ex; } catch(InvalidTagException ex) { throw ex; } catch(ResourceNotFoundException ex) { throw ex; } // Display the result. System.out.println(result); } }
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。