// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ApplePushNotificationCertificate
{
OdataType = "#microsoft.graph.applePushNotificationCertificate",
AppleIdentifier = "Apple Identifier value",
TopicIdentifier = "Topic Identifier value",
ExpirationDateTime = DateTimeOffset.Parse("2016-12-31T23:57:57.2481234-08:00"),
CertificateUploadStatus = "Certificate Upload Status value",
CertificateUploadFailureReason = "Certificate Upload Failure Reason value",
CertificateSerialNumber = "Certificate Serial Number value",
Certificate = "Certificate value",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.ApplePushNotificationCertificate.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ApplePushNotificationCertificate applePushNotificationCertificate = new ApplePushNotificationCertificate();
applePushNotificationCertificate.setOdataType("#microsoft.graph.applePushNotificationCertificate");
applePushNotificationCertificate.setAppleIdentifier("Apple Identifier value");
applePushNotificationCertificate.setTopicIdentifier("Topic Identifier value");
OffsetDateTime expirationDateTime = OffsetDateTime.parse("2016-12-31T23:57:57.2481234-08:00");
applePushNotificationCertificate.setExpirationDateTime(expirationDateTime);
applePushNotificationCertificate.setCertificateUploadStatus("Certificate Upload Status value");
applePushNotificationCertificate.setCertificateUploadFailureReason("Certificate Upload Failure Reason value");
applePushNotificationCertificate.setCertificateSerialNumber("Certificate Serial Number value");
applePushNotificationCertificate.setCertificate("Certificate value");
ApplePushNotificationCertificate result = graphClient.deviceManagement().applePushNotificationCertificate().patch(applePushNotificationCertificate);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.apple_push_notification_certificate import ApplePushNotificationCertificate
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ApplePushNotificationCertificate(
odata_type = "#microsoft.graph.applePushNotificationCertificate",
apple_identifier = "Apple Identifier value",
topic_identifier = "Topic Identifier value",
expiration_date_time = "2016-12-31T23:57:57.2481234-08:00",
certificate_upload_status = "Certificate Upload Status value",
certificate_upload_failure_reason = "Certificate Upload Failure Reason value",
certificate_serial_number = "Certificate Serial Number value",
certificate = "Certificate value",
)
result = await graph_client.device_management.apple_push_notification_certificate.patch(request_body)
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.